public InsertionTool(ConfigurationParams params) throws ConfigurationException { try { m_driver = params.get("driver"); m_url = params.get("url"); m_username = params.get("username"); m_password = params.get("password"); m_insertionBatchSize=params.getInt("insertion batch size"); } catch (ConfigurationException e) { throw new ConfigurationException("Error getting parameters for Database connection. make sure you have values for driver,url,username and password params in Database module on the configuration file you supplied", e); } }
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); }
/** * Ctor with {@link ConfigurationParams} * @throws LexicalResourceException * @throws ConfigurationException */ public LinProximityOriginalLexicalResource(ConfigurationParams params) throws LexicalResourceException, ConfigurationException { this(params.getString(PARAM_CONNECTION_STRING), null, null, params.getInt(PARAM_RULES_LIMIT) ); }
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)); }
public static ConfigurationFile loadConfigurationFile(String configurationFileName) throws ConfigurationException { try { return new ConfigurationFile(new ImplCommonConfig(new File(configurationFileName))); } catch (eu.excitementproject.eop.common.exception.ConfigurationException e) { throw new ConfigurationException("Failed to load configuration file. Please see nested exception.",e); } }
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) {} }
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; }
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 VerbOceanLexicalResource(ConfigurationParams params) throws LexicalResourceException, ConfigurationException { this( params.getDouble(PARAM_SCORE_THRESHOLD), params.getFile(PARAM_FILE), params.getEnumSet(RelationType.class, PARAM_ALLOWED_RELATIONS)); } /////////////////////////////////////////////////////////////// PUBLIC ////////////////////////////////////////////////////////////
public LineBasedStringCountSentenceReader(ConfigurationParams params) { super(params); try { delimiter = params.get(Configuration.DELIMITER); } catch (ConfigurationException e) { delimiter = DEFAULT_DELIMITER; } }
protected ConfigurationParams getTruthTellerParams() throws ConfigurationException { ConfigurationParams params = configurationFile.getModuleConfiguration(TransformationsConfigurationParametersNames.TRUTH_TELLER_MODULE_NAME); return params; }
/** * Ctor * @throws ConfigurationException * @throws AnnotatorException */ public DefaultSentenceAnnotator(ConfigurationParams annotationParams) throws AnnotatorException, ConfigurationException { this( annotationParams.getFile(TransformationsConfigurationParametersNames.ANNOTATION_RULES_FILE)); }
public WordPairBasedElementFeatureExtraction(ConfigurationParams params) throws ConfigurationException, IOException { super(params); try { this.minCount = params.getInt(Configuration.MIN_COUNT); } catch (ConfigurationException e) { this.minCount = 0; } }
/** * Ctor using {@link ConfigurationParams} * @param params * @throws LexicalResourceException * @throws ConfigurationException */ public LinDistsimLexicalResource(ConfigurationParams params) throws LexicalResourceException, ConfigurationException { this(params.getString(PARAM_CONNECTION_STRING), null, null, params.getInt(PARAM_RULES_LIMIT) ); }
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 ConfigurationBasedDataStructureFactory(ConfigurationFile confFile) throws ConfigurationException { textUnitParams = confFile.getModuleConfiguration(Configuration.TEXT_UNITS_DATA_STRUCTURE); coOccurrenceParams = confFile.getModuleConfiguration(Configuration.CO_OCCURRENCES_DATA_STRUCTURE); elementParams = confFile.getModuleConfiguration(Configuration.ELEMENTS_DATA_STRUCTURE); featureParams = confFile.getModuleConfiguration(Configuration.FEATURES_DATA_STRUCTURE); elementFeatureCountsParams = confFile.getModuleConfiguration(Configuration.ELEMENT_FEATURE_COUNTS_DATA_STRUCTURE); featureElementsParams = confFile.getModuleConfiguration(Configuration.FEATURE_ELEMENTS_DATA_STRUCTURE); elementFeatureScoresParams = confFile.getModuleConfiguration(Configuration.ELEMENT_FEATURE_SCORES_DATA_STRUCTURE); elementElementScoresParams = confFile.getModuleConfiguration(Configuration.ELEMENT_SCORES_DATA_STRUCTURE); }
public CatvarLexicalResource(ConfigurationParams params) throws LexicalResourceException, ConfigurationException { this(params.getFile(PARAM_CATVAR_FILE_NAME)); }
/** * Ctor using {@link ConfigurationParams} * @param params * @throws LexicalResourceException * @throws ConfigurationException */ public AbstractDirectLexicalResource(ConfigurationParams params) throws LexicalResourceException, ConfigurationException { this(params.getString(PARAM_CONNECTION_STRING), null, null, params.getInt(PARAM_RULES_LIMIT)); }