public PredicateArgumentStructureBuilderFactoryFactory(ConfigurationParams params) throws ConfigurationException, NomlexException { this.nomlexMap = createNomlexMapFromConfigurationParams(params); PastaMode modeInConfiguration = null; if (params.containsKey(MODE_PARAMETER_NAME)) { modeInConfiguration = params.getEnum(PastaMode.class, MODE_PARAMETER_NAME); } else { modeInConfiguration = PastaMode.BASIC; } this.mode = modeInConfiguration; }
public WordnetLexicalResource(ConfigurationParams params) throws LexicalResourceException, ConfigurationException { this( params.getDirectory(PARAM_WN_DIR), params.getBoolean(PARAM_ONLY_FIRST_LEFT), params.getBoolean(PARAM_ONLY_FIRST_RIGHT), params.getEnumSet(WordNetRelation.class, PARAM_DEFAULT_RELATIONS), params.getInt(PARAM_CHAINING_LENGTH), params.containsKey(PARAM_WORDNET_DICTIONARY_IMPLEMENTATION_TYPE) ? params.getEnum(WordnetDictionaryImplementationType.class, PARAM_WORDNET_DICTIONARY_IMPLEMENTATION_TYPE) : null); }
public static PARSER setParserMode(ConfigurationParams params) throws ConfigurationException, TeEngineMlException { if (params.containsKey(ConfigurationParametersNames.RTE_ENGINE_PARSER_PARAMETER_NAME)) { PARSER parser = params.getEnum(PARSER.class, ConfigurationParametersNames.RTE_ENGINE_PARSER_PARAMETER_NAME); logger.info("Setting parser to "+parser.name()); ParserSpecificConfigurations.changeParser(parser); return parser; } else { throw new TeEngineMlException("Parser mode parameters missing."); //logger.warn("Parser mode not set. Using default: "+ParserSpecificConfigurations.getParserMode().name()); } }
/** * @param params configuration params for initialization. Should include: * <li>table_file - path to the file that contains the rules, in table format. Can also be a URL. * <li>table_separator - pattern of column-separator, e.g. "->". * <li>part_of_speech - canonical name of the part-of-speech for this rule-base. For possible values, see {@link SimplerCanonicalPosTag}. * <li>relation_name - name of relation to put in rules (the same for all rules). * <li>(NOTE: The params.getModuleName() is used as the resource_name). */ public FileBasedLexicalResource(ConfigurationParams params) throws UnsupportedPosTagStringException, IOException, ConfigurationException { super( ValueSetMapFromStringCreator.mapFromConfigurationParams(params), params.getEnum(SimplerCanonicalPosTag.class, "part_of_speech"), params.getModuleName(), params.getString("relation_name")); } }
/** * @param params configuration params for initialization. Should include: * <li>table_file - path to the file that contains the rules, in table format. Can also be a URL. * <li>table_separator - pattern of column-separator, e.g. "->". * <li>part_of_speech - canonical name of the part-of-speech for this rule-base. For possible values, see {@link SimplerCanonicalPosTag}. * <li>relation_name - name of relation to put in rules (the same for all rules). * <li>minimum_seconds_between_loads (int) - The minimum number of seconds between each consecutive loads from the file. * <li>(NOTE: The params.getModuleName() is used as the resource_name). */ public OnlineFileBasedLexicalResource(ConfigurationParams params) throws UnsupportedPosTagStringException, IOException, ConfigurationException { super( null, params.getEnum(SimplerCanonicalPosTag.class, "part_of_speech"), params.getModuleName(), params.getString("relation_name")); this.file = params.getString("file"); this.separator = params.getString("separator"); this.minimumSecondsBetweenLoads = params.getInt("minimum_seconds_between_loads"); this.map = ValueSetMapFromStringCreator.mapFromConfigurationParams(params); }
if (params.containsKey(PREPROCESS_COREFERENCE_RESOLUTION_ENGINE)) corefChoice = params.getEnum(CoreferenceEngineChoice.class, PREPROCESS_COREFERENCE_RESOLUTION_ENGINE);
SentenceSplitterType sentenceSplitterType = params.getEnum(SentenceSplitterType.class, PREPROCESS_SENTENCE_SPLITTER_TYPE); logger.info("Using "+sentenceSplitterType.name()+" sentence splitter."); switch(sentenceSplitterType)