use of edu.stanford.nlp.pipeline.CoreMapAttributeAggregator in project CoreNLP by stanfordnlp.
the class Env method getDefaultTokensAggregator.
public CoreMapAggregator getDefaultTokensAggregator() {
if (defaultTokensAggregator == null && (defaultTokensAggregators != null || aggregateToTokens)) {
CoreLabelTokenFactory tokenFactory = (aggregateToTokens) ? new CoreLabelTokenFactory() : null;
Map<Class, CoreMapAttributeAggregator> aggregators = defaultTokensAggregators;
if (aggregators == null) {
aggregators = CoreMapAttributeAggregator.DEFAULT_NUMERIC_TOKENS_AGGREGATORS;
}
defaultTokensAggregator = CoreMapAggregator.getAggregator(aggregators, null, tokenFactory);
}
return defaultTokensAggregator;
}
Aggregations