public LineBasedStringCountSentenceReader(ConfigurationParams params) { super(params); try { delimiter = params.get(Configuration.DELIMITER); } catch (ConfigurationException e) { delimiter = DEFAULT_DELIMITER; } }
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 TextProParser(ConfigurationParams params) throws InstrumentCombinationException { try { this.textProPath = params.getString("textPro-path"); this.parser = params.get("parser"); this.parserPath = params.getString("parser-path"); this.encoding = params.getString("encoding"); } catch (ConfigurationException e) { throw new InstrumentCombinationException("Nested exception in reading the configuration file", e); } }
public BidirectionalPredArgElementFeatureExtraction(ConfigurationParams params) throws ConfigurationException, IOException { super(params); this.relevantSlot = PredicateArgumentSlots.valueOf(params.get(Configuration.SLOT)); try { this.minCount = params.getInt(Configuration.MIN_COUNT); } catch (ConfigurationException e) { this.minCount = 0; } initElementStorage(params); }
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 File(ConfigurationParams params) throws ConfigurationException { this.file = new java.io.File(params.get(Configuration.FILE)); this.bRead = params.get(Configuration.READ_WRITE).equals("read"); try { this.encoding = params.get(Configuration.ENCODING); } catch (ConfigurationException e) { this.encoding = DEFAULT_ENCODING; } }
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 ReaderBasedSentenceReader(ConfigurationParams params) { try { charset = Charset.forName(params.get(Configuration.ENCODING)); } catch (ConfigurationException e) { charset = Charset.forName(DEFAULT_ENCODING); } reader = null; }
public UnlimitedMemoryBasedCountableIdentifiableStorage(ConfigurationParams params) throws LoadingStateException { this(); try { initRedis(params.get(Configuration.REDIS_HOST),Integer.parseInt(params.get(Configuration.REDIS_PORT))); tmpDIR = params.get(Configuration.TMP_CONTENT_DIR); tmpFileIndex = 0; } catch (Exception e) { throw new LoadingStateException(e); } }
CooccurrenceCollector(Set<File> files, int id) throws CreationException, ConfigurationException { this.files = files; this.id = id; this.sentenceReader = (FileBasedSentenceReader) Factory.create(confParams.get(Configuration.SENTENCE_READER_CLASS), confParams); this.cooccurrenceExtraction = (CooccurrenceExtraction) Factory.create(confParams.get(Configuration.EXTRACTION_CLASS), confParams); //tmp //System.out.println("Thread " + id + ": got " + files.size() + " files"); }
public StopWordsBasedElementFeatureExtraction(ConfigurationParams params) throws IOException { this.stopWordsFeatures = new HashSet<String>(); try { initStopWords(new File(params.get(Configuration.STOP_WORDS_FILE))); } catch (ConfigurationException e) { logger.info("no stop-words file is defined"); } }
@Override public ElementSimilarityScoring create() throws CreationException { try { return (ElementSimilarityScoring)Factory.create(similarityCalculatorParams.get(Configuration.SIMILARITY_SCORING_CLASS),similarityCalculatorParams); } catch (Exception e) { throw new CreationException(e); } } };
@SuppressWarnings("unchecked") @Override public IDKeyPersistentBasicMap<BasicSet<Integer>> createFeatureElementsDataStructure() throws CreationException { try { return (IDKeyPersistentBasicMap<BasicSet<Integer>>) Factory.create(featureElementsParams.get(Configuration.CLASS),featureElementsParams); } catch (Exception e) { throw new CreationException(e); } }
@SuppressWarnings("unchecked") @Override public IDKeyPersistentBasicMap<Double> createElementScoresDataStructure() throws CreationException { try { return (IDKeyPersistentBasicMap<Double>) Factory.create(elementElementScoresParams.get(Configuration.CLASS),elementElementScoresParams); } catch (Exception e) { throw new CreationException(e); } }
@SuppressWarnings("unchecked") @Override public IDKeyPersistentBasicMap<BasicMap<Integer, Double>> createElementFeatureCountsDataStructure() throws CreationException { try { return (IDKeyPersistentBasicMap<BasicMap<Integer, Double>>) Factory.create(elementFeatureCountsParams.get(Configuration.CLASS),elementFeatureCountsParams); } catch (Exception e) { throw new CreationException(e); } }
@SuppressWarnings("unchecked") @Override public IDKeyPersistentBasicMap<LinkedHashMap<Integer,Double>> createElementFeatureScoresDataStructure() throws CreationException { try { return (IDKeyPersistentBasicMap<LinkedHashMap<Integer,Double>>) Factory.create(elementFeatureScoresParams.get(Configuration.CLASS),elementFeatureScoresParams); } catch (Exception e) { throw new CreationException(e); } }
@SuppressWarnings("unchecked") @Override public CountableIdentifiableStorage<TextUnit> createTextUnitsDataStructure() throws CreationException { try { return (CountableIdentifiableStorage<TextUnit>) Factory.create(textUnitParams.get(Configuration.CLASS),textUnitParams); } catch (Exception e) { throw new CreationException(e); } }
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public CountableIdentifiableStorage<IDBasedCooccurrence> createCooccurrencesDataStucture() throws CreationException { try { return (CountableIdentifiableStorage<IDBasedCooccurrence>) Factory.create(coOccurrenceParams.get(Configuration.CLASS),coOccurrenceParams); } catch (Exception e) { throw new CreationException(e); } }
@SuppressWarnings("unchecked") @Override public CountableIdentifiableStorage<Feature> createFeaturesDataStucture() throws CreationException { try { return (CountableIdentifiableStorage<Feature>) Factory.create(featureParams.get(Configuration.CLASS),featureParams); } catch (Exception e) { throw new CreationException(e); } }