本文整理了Java中edu.illinois.cs.cogcomp.core.utilities.configuration.ResourceManager.getDouble
方法的一些代码示例,展示了ResourceManager.getDouble
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResourceManager.getDouble
方法的具体详情如下:
包路径:edu.illinois.cs.cogcomp.core.utilities.configuration.ResourceManager
类名称:ResourceManager
方法名:getDouble
[英]getters with default values -- won't throw exceptions
[中]具有默认值的getter不会抛出异常
代码示例来源:origin: CogComp/cogcomp-nlp
public double getDouble(Property property) {
return getDouble(property.key);
}
代码示例来源:origin: edu.illinois.cs.cogcomp/illinois-core-utilities
public double getDouble(Property property) {
return getDouble(property.key);
}
代码示例来源:origin: edu.illinois.cs.cogcomp/illinois-phrasesim
private PhraseSim(ResourceManager config ) throws FileNotFoundException {
loadParagram( config.getString( PhraseSimConfigurator.PARAGRAM_PATH.key ),
config.getInt( PhraseSimConfigurator.VECTOR_DIM.key ) );
unknownValue = config.getDouble( PhraseSimConfigurator.UNKNOWN_VALUE.key );
zeroArray = new double[ dimension ];
Arrays.fill( zeroArray, 0.0 );
}
代码示例来源:origin: CogComp/cogcomp-nlp
public static void initWithDefaults() throws IOException {
ResourceManager rm = (new WordEmbeddingsConfigurator()).getDefaultConfig();
List<String> fileNames = new LinkedList<>();
fileNames.add(rm.getString(WordEmbeddingsConfigurator.fileNames.key));
List<Integer> embeddingDimensionality = new LinkedList<>();
embeddingDimensionality.add(rm.getInt(WordEmbeddingsConfigurator.dimensionalities.key));
List<Integer> minWordAppearanceThres = new LinkedList<>();
minWordAppearanceThres.add(rm.getInt(WordEmbeddingsConfigurator.wordNumThreshold.key));
List<Boolean> isLowercasedEmbedding = new LinkedList<>();
isLowercasedEmbedding.add(rm.getBoolean(WordEmbeddingsConfigurator.isLowercase.key));
List<Double> normalizationConstant = new LinkedList<>();
normalizationConstant.add(rm
.getDouble(WordEmbeddingsConfigurator.normalizationConstants.key));
List<NormalizationMethod> normalizationMethods = new LinkedList<>();
normalizationMethods.add(NormalizationMethod.valueOf(rm
.getString(WordEmbeddingsConfigurator.normalizationMethods.key)));
init(fileNames, embeddingDimensionality, minWordAppearanceThres, isLowercasedEmbedding,
normalizationConstant, normalizationMethods);
}
代码示例来源:origin: CogComp/cogcomp-nlp
public DatalessClassifierML(ResourceManager config, ConceptTree<T> conceptTree) {
this.conceptTree = conceptTree;
this.bottomUp = config.getBoolean(DatalessConfigurator.BottomUp_Inference.key);
this.classifierThreshold = config.getDouble(DatalessConfigurator.classifierThreshold.key);
this.classifierLeastK = config.getInt(DatalessConfigurator.classifierLeastK.key);
this.classifierMaxK = config.getInt(DatalessConfigurator.classifierMaxK.key);
}
代码示例来源:origin: CogComp/cogcomp-nlp
double trainFrac = fullRm.getDouble(CorpusSplitConfigurator.TRAIN_FRACTION.key);
double testFrac = fullRm.getDouble(CorpusSplitConfigurator.TEST_FRACTION.key);
代码示例来源:origin: edu.illinois.cs.cogcomp/illinois-datalessclassification
public DatalessClassifierML(ResourceManager config, ConceptTree<T> conceptTree) {
this.conceptTree = conceptTree;
this.bottomUp = config.getBoolean(DatalessConfigurator.BottomUp_Inference.key);
this.classifierThreshold = config.getDouble(DatalessConfigurator.classifierThreshold.key);
this.classifierLeastK = config.getInt(DatalessConfigurator.classifierLeastK.key);
this.classifierMaxK = config.getInt(DatalessConfigurator.classifierMaxK.key);
}
代码示例来源:origin: edu.illinois.cs.cogcomp/illinois-edison
public static void initWithDefaults() throws IOException {
ResourceManager rm = (new WordEmbeddingsConfigurator()).getDefaultConfig();
List<String> fileNames = new LinkedList<>();
fileNames.add(rm.getString(WordEmbeddingsConfigurator.fileNames.key));
List<Integer> embeddingDimensionality = new LinkedList<>();
embeddingDimensionality.add(rm.getInt(WordEmbeddingsConfigurator.dimensionalities.key));
List<Integer> minWordAppearanceThres = new LinkedList<>();
minWordAppearanceThres.add(rm.getInt(WordEmbeddingsConfigurator.wordNumThreshold.key));
List<Boolean> isLowercasedEmbedding = new LinkedList<>();
isLowercasedEmbedding.add(rm.getBoolean(WordEmbeddingsConfigurator.isLowercase.key));
List<Double> normalizationConstant = new LinkedList<>();
normalizationConstant.add(rm
.getDouble(WordEmbeddingsConfigurator.normalizationConstants.key));
List<NormalizationMethod> normalizationMethods = new LinkedList<>();
normalizationMethods.add(NormalizationMethod.valueOf(rm
.getString(WordEmbeddingsConfigurator.normalizationMethods.key)));
init(fileNames, embeddingDimensionality, minWordAppearanceThres, isLowercasedEmbedding,
normalizationConstant, normalizationMethods);
}
代码示例来源:origin: edu.illinois.cs.cogcomp/illinois-corpusreaders
double trainFrac = fullRm.getDouble(CorpusSplitConfigurator.TRAIN_FRACTION.key);
double testFrac = fullRm.getDouble(CorpusSplitConfigurator.TEST_FRACTION.key);
代码示例来源:origin: CogComp/cogcomp-nlp
/**
* reads parameters from configuration file named by m_propertiesFile loads
* stopwords, sets xmlrpc client if appropriate
*
* @throws IllegalArgumentException
* @throws IOException
*/
protected void configure(ResourceManager rm_) throws IllegalArgumentException, IOException {
// boolean useWordSim = rm_.getBoolean(Constants.USE_WORDSIM); // if
// false, use WNSim (older
// package)
entailmentThreshold = rm_.getDouble(SimConfigurator.WORD_ENTAILMENT_THRESHOLD.key);
computeSimpleScore = rm_.getBoolean(SimConfigurator.USE_SIMPLE_SCORE.key);
String wordComparator = rm_.getString(SimConfigurator.WORD_METRIC);
wordSim = new WordSim(rm_, wordComparator);
}
代码示例来源:origin: edu.illinois.cs.cogcomp/illinois-corpusreaders
double trainFrac = fullRm.getDouble(CorpusSplitConfigurator.TRAIN_FRACTION.key);
double devFrac = fullRm.getDouble(CorpusSplitConfigurator.DEV_FRACTION.key);
double testFrac = fullRm.getDouble(CorpusSplitConfigurator.TEST_FRACTION.key);
代码示例来源:origin: CogComp/cogcomp-nlp
double trainFrac = fullRm.getDouble(CorpusSplitConfigurator.TRAIN_FRACTION.key);
double devFrac = fullRm.getDouble(CorpusSplitConfigurator.DEV_FRACTION.key);
double testFrac = fullRm.getDouble(CorpusSplitConfigurator.TEST_FRACTION.key);
代码示例来源:origin: CogComp/cogcomp-nlp
private void initialize(ResourceManager rm_, Comparator<String, EntailmentResult> comparator) throws IOException {
ResourceManager fullRm = new SimConfigurator().getConfig(rm_);
double threshold = fullRm.getDouble(SimConfigurator.LLM_ENTAILMENT_THRESHOLD.key);
tokenizer = new IllinoisTokenizer();
this.comparator = comparator;
filter = new WordListFilter(fullRm);
neAligner = new Aligner<String, EntailmentResult>(new NEComparator(), filter);
aligner = new Aligner<String, EntailmentResult>(comparator, filter);
scorer = new GreedyAlignmentScorer<String>(threshold);
}
代码示例来源:origin: CogComp/cogcomp-nlp
double randomNoiseLevel = rm.getDouble(NerBaseConfigurator.RANDOM_NOISE_LEVEL);
double omissionRate = rm.getDouble(NerBaseConfigurator.OMISSION_RATE);
param.featurePruningThreshold = rm.getDouble(NerBaseConfigurator.FEATUREPRUNINGTHRESHOLD);
代码示例来源:origin: edu.illinois.cs.cogcomp/illinois-mlner
double randomNoiseLevel = rm.getDouble(NerBaseConfigurator.RANDOM_NOISE_LEVEL);
double omissionRate = rm.getDouble(NerBaseConfigurator.OMISSION_RATE);
代码示例来源:origin: edu.illinois.cs.cogcomp/illinois-ner
double randomNoiseLevel = rm.getDouble(NerBaseConfigurator.RANDOM_NOISE_LEVEL);
double omissionRate = rm.getDouble(NerBaseConfigurator.OMISSION_RATE);
param.featurePruningThreshold = rm.getDouble(NerBaseConfigurator.FEATUREPRUNINGTHRESHOLD);
内容来源于网络,如有侵权,请联系作者删除!