Search in sources :

Example 1 with CoreMapAttributeAggregator

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;
}
Also used : CoreLabelTokenFactory(edu.stanford.nlp.process.CoreLabelTokenFactory) CoreMapAttributeAggregator(edu.stanford.nlp.pipeline.CoreMapAttributeAggregator)

Aggregations

CoreMapAttributeAggregator (edu.stanford.nlp.pipeline.CoreMapAttributeAggregator)1 CoreLabelTokenFactory (edu.stanford.nlp.process.CoreLabelTokenFactory)1