Class FeatureConfiguration


  • public class FeatureConfiguration
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean featureActive​(java.util.Properties propDef, java.lang.String propName)
      check whether a boolean feature exists and is set to "true"
      int[] getIntArray​(java.util.Properties propDef, java.lang.String propName)  
      java.util.ArrayList<java.lang.String> getLexiconKeys​(java.util.Properties propDef)  
      java.lang.String[] getStringArray​(java.util.Properties propDef, java.lang.String propName)
      Gets the value of a property, splitting it into Strings
      java.lang.String[] getTrueMetas​(java.util.Properties featureConfig)
      The Properties Object featureConfig contains key-value pairs.
      int[][] offsetConjFromConfig​(java.lang.String offset_conjunctions)
      extracts the offset conjunction information (feature creation horizon) from a String of the form (-1) (0) (1), (-1) (0) (1,2) or (-1) (0) (1 2)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FeatureConfiguration

        public FeatureConfiguration()
    • Method Detail

      • featureActive

        public boolean featureActive​(java.util.Properties propDef,
                                     java.lang.String propName)
        check whether a boolean feature exists and is set to "true"
        Parameters:
        propDef -
        propName -
        Returns:
      • getIntArray

        public int[] getIntArray​(java.util.Properties propDef,
                                 java.lang.String propName)
      • offsetConjFromConfig

        public int[][] offsetConjFromConfig​(java.lang.String offset_conjunctions)
        extracts the offset conjunction information (feature creation horizon) from a String of the form (-1) (0) (1), (-1) (0) (1,2) or (-1) (0) (1 2)
      • getLexiconKeys

        public java.util.ArrayList<java.lang.String> getLexiconKeys​(java.util.Properties propDef)
      • getTrueMetas

        public java.lang.String[] getTrueMetas​(java.util.Properties featureConfig)
        The Properties Object featureConfig contains key-value pairs. Some of these pairs correspond to information about meta datas. This method returns a list of the used meta datas by searching for pairs of the form "xxx_feat_enabled = true". It then adds the "xxx" to the list. For "pos_feat_enabled = true" it will add pos to the list. For "chunk_feat_enabled = false" it will do nothing.
      • getStringArray

        public java.lang.String[] getStringArray​(java.util.Properties propDef,
                                                 java.lang.String propName)
        Gets the value of a property, splitting it into Strings
        Parameters:
        propDef - Property file to parse
        propName - Property key to extract values for
        Returns:
        String[], containing the value split at "," or null, if not found