private boolean isHybridMode() throws ConfigurationException { boolean hybridMode = false; if (configurationParams.containsKey(RTE_ENGINE_GAP_HYBRID_MODE)) { hybridMode = configurationParams.getBoolean(RTE_ENGINE_GAP_HYBRID_MODE); } return hybridMode; }
protected boolean userRequiresAnnotations(ConfigurationParams params) throws ConfigurationException { boolean ret = true; if (params.containsKey(TransformationsConfigurationParametersNames.USER_REQUIRES_ANNOTATIONS)) { ret = params.getBoolean(TransformationsConfigurationParametersNames.USER_REQUIRES_ANNOTATIONS); } return ret; }
public Redis(ConfigurationParams params) throws ConfigurationException { this.dbFile = params.get(Configuration.REDIS_FILE); this.jedis = null; this.currID = -1; this.bVM = false; try { bVM = params.getBoolean(eu.excitementproject.eop.redis.Configuration.REDIS_VM); } catch (ConfigurationException e) {} }
public RedisBasedIDKeyPersistentBasicMap(ConfigurationParams params) throws ConfigurationException, FileNotFoundException, RedisRunException { boolean bVM = false; try { bVM = params.getBoolean(eu.excitementproject.eop.redis.Configuration.REDIS_VM); } catch (ConfigurationException e) {} init(params.get(Configuration.REDIS_FILE),bVM); }
public static void init(ConfigurationParams params) throws eu.excitementproject.eop.common.utilities.configuration.ConfigurationException { maximumLemmaLength=params.getInt("max_term_length"); minimumLemmaLength=params.getInt("min_term_length"); useDeAccent=params.getBoolean("useDeAccent"); initiated=true; }
public LemmaPosBasedElementFeatureExtraction(ConfigurationParams params) throws ConfigurationException, IOException { super(params); this.bIncludeDependencyRelation = params.getBoolean(Configuration.INCLUDE_DEPENDENCY_RELATION); try { this.minCount = params.getInt(Configuration.MIN_COUNT); } catch (ConfigurationException e) { this.minCount = 0; } this.posFilter = new SetBasedPOSFilter(params); }
public RedisBasedCountableIdentifiableStorage(ConfigurationParams params) throws ConfigurationException, RedisRunException { boolean bVM = false; try { bVM = params.getBoolean(eu.excitementproject.eop.redis.Configuration.REDIS_VM); } catch (ConfigurationException e) {} init(params.getString(Configuration.REDIS_FILE),bVM); }
public CollNodeSentenceReader(ConfigurationParams params) throws ConfigurationException, CreationException { super(params); this.pos = (PartOfSpeech)Factory.create(params.get(Configuration.PART_OF_SPEECH_CLASS),"other"); try { this.bAutoGenerationOfArtificialRoot = params.getBoolean(Configuration.GENERATE_ARTIFICIAL_ROOT); } catch (ConfigurationException e) { this.bAutoGenerationOfArtificialRoot = true; } this.position = 0; }
public RedisBasedBasicMap(ConfigurationParams params) throws ConfigurationException, RedisRunException { boolean bVM = false; try { bVM = params.getBoolean(eu.excitementproject.eop.redis.Configuration.REDIS_VM); } catch (ConfigurationException e) {} init(params.get(Configuration.REDIS_FILE),bVM); }
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); }
isNoveltyTask = configurationParams.getBoolean(RTE_SUM_IS_NOVELTY_TASK_FLAG); logger.info("Loading " + (isNoveltyTask ? "Novelty" : "Main") + " task files");
isNoveltyTask = configurationParams.getBoolean(RTE_SUM_IS_NOVELTY_TASK_FLAG); logger.info("Loading " + (isNoveltyTask ? "Novelty" : "Main") + " task files");
public UKwacNodeSentenceReader(ConfigurationParams params) throws ConfigurationException, CreationException { ukwacTool = new UkWacTreeTools(); seperator = new UkwacIndexSeperators(params.getBoolean(Configuration.IS_CORPUS_INDEX)); try { encoding = params.get(Configuration.ENCODING); } catch (ConfigurationException e) { encoding = DEFAULT_ENCODING; } reader = null; position = 0; }
public XMLNodeSentenceReader(ConfigurationParams params) throws CreationException { try { this.ignoreSavedCanonicalPosTag = params.getBoolean(Configuration.IGNORE_SAVED_CANONICAL_POS_TAG); } catch (ConfigurationException e) { this.ignoreSavedCanonicalPosTag = true; } try { this.posFactory = (XmlTreePartOfSpeechFactory)Factory.create(params.get(Configuration.PART_OF_SPEECH_FACTORY_CLASS),""); } catch (ConfigurationException e) { this.posFactory = new PennXmlTreePosFactory(); } this.trees = null; this.position = 0; }
/** * Create an initialized NamedEntityRecognizer using the given configuration params. */ public static NamedEntityRecognizer createNamedEntityRecognizer(ConfigurationParams params) throws InstrumentCombinationException{ boolean doNer; try { doNer = (params.containsKey("do_named_entity_recognition")? params.getBoolean("do_named_entity_recognition"): false); if (doNer) { NamedEntityRecognizer ner = new StanfordNamedEntityRecognizer(new File(params.getFile("ner-classifier-path").getAbsolutePath())); ner.init(); return ner; } else return null; } catch (ConfigurationException e) { throw new InstrumentCombinationException("Nested exception with configuration file while initializing the NER", e); } catch (NamedEntityRecognizerException e) { throw new InstrumentCombinationException("Nested exception while initializing the NER", e); } } }
public RedisBasedStringListBasicMap(ConfigurationParams params) throws ConfigurationException, FileNotFoundException, RedisRunException { String dbFile = params.get(Configuration.REDIS_FILE); boolean bVM = false; try { bVM = params.getBoolean(Configuration.REDIS_VM); } catch (ConfigurationException e) {} String redisDir = null; try { redisDir = params.get(Configuration.REDIS_BIN_DIR); init(dbFile,redisDir,bVM); } catch (ConfigurationException e) { init(dbFile,bVM); } }
private WhichClassifier inferWhichClassifier(String rGuess_orDummy_parameter, String modelParameter) throws ConfigurationException, TeEngineMlException { WhichClassifier which = null; if (configurationParams.containsKey(rGuess_orDummy_parameter)) { which=configurationParams.getBoolean(rGuess_orDummy_parameter)?WhichClassifier.REASONABLE_GUESS_OR_DUMMY:null; } if (null==which) { if (configurationParams.containsKey(modelParameter)) { which=WhichClassifier.XML_MODEL; } } if (null==which) { if (null==useF1Classifier_FalseForAccuracy_NullForXMLModelFile) throw new TeEngineMlException("Cannot infer which classifier to use. Please fix the configuration file."); if (useF1Classifier_FalseForAccuracy_NullForXMLModelFile) { which = WhichClassifier.FROM_SAMPLES_F1; } else { which = WhichClassifier.FROM_SAMPLES_ACCURACY; } } return which; }
public WiktionaryLexicalResource(ConfigurationParams params) throws LexicalResourceException, ConfigurationException { this( params.getString(PARAM_WKT_DIRECTORY), params.getString(PARAM_POS_TAGGER_MODEL_FILE), params.getInt(PARAM_LEFT_SENSE), params.getInt(PARAM_RIGHT_SENSE), params.getBoolean(PARAM_USE_ENTRY_INFO), params.getEnumSet(WiktionaryRelation.class, PARAM_RELATIONS)); }
private void readConfigurationFile() throws ConfigurationFileDuplicateKeyException, ConfigurationException, NumberFormatException, TeEngineMlException, ParserRunException, NamedEntityRecognizerException, TextPreprocessorException { configurationFile = SystemInitialization.loadConfigurationFile(this.configurationFileName); configurationFile.setExpandingEnvironmentVariables(true); ConfigurationParams params = configurationFile.getModuleConfiguration(RTE_PAIRS_PREPROCESS_MODULE_NAME); instruments = new InstrumentsFactory().getDefaultInstruments(params); if (params.containsKey(PREPROCESS_DO_NER)) { doNer = params.getBoolean(PREPROCESS_DO_NER); } else { doNer = true; } if (params.containsKey(PREPROCESS_DO_TEXT_NORMALIZATION)) { doTextNormalization = params.getBoolean(PREPROCESS_DO_TEXT_NORMALIZATION); } else { doTextNormalization=true; } }
bVM = params.getBoolean(Configuration.REDIS_VM); } catch (ConfigurationException e) {