edu.stanford.nlp.pipeline
Class CoreMapAggregator

java.lang.Object
  extended by edu.stanford.nlp.pipeline.CoreMapAggregator
All Implemented Interfaces:
Function<java.util.List<? extends CoreMap>,CoreMap>

public class CoreMapAggregator
extends java.lang.Object
implements Function<java.util.List<? extends CoreMap>,CoreMap>

Function that aggregates several core maps into one

Author:
Angel Chang

Field Summary
static CoreMapAggregator DEFAULT_AGGREGATOR
           
 
Constructor Summary
CoreMapAggregator(java.util.Map<java.lang.Class,CoreMapAttributeAggregator> aggregators)
           
CoreMapAggregator(java.util.Map<java.lang.Class,CoreMapAttributeAggregator> aggregators, java.lang.Class mergedKey)
           
 
Method Summary
 CoreMap apply(java.util.List<? extends CoreMap> in)
          Converts a T1 to a different T2.
static CoreMapAggregator getAggregator(java.util.Map<java.lang.Class,CoreMapAttributeAggregator> aggregators)
           
static CoreMapAggregator getAggregator(java.util.Map<java.lang.Class,CoreMapAttributeAggregator> aggregators, java.lang.Class key)
           
static CoreMapAggregator getDefaultAggregator()
           
 CoreMap merge(java.util.List<? extends CoreMap> in, int start, int end)
           
 java.util.List<CoreMap> merge(java.util.List<? extends CoreMap> list, java.util.List<? extends HasInterval<java.lang.Integer>> matched)
           
<M> java.util.List<CoreMap>
merge(java.util.List<? extends CoreMap> list, java.util.List<M> matched, Function<M,Interval<java.lang.Integer>> toIntervalFunc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_AGGREGATOR

public static final CoreMapAggregator DEFAULT_AGGREGATOR
Constructor Detail

CoreMapAggregator

public CoreMapAggregator(java.util.Map<java.lang.Class,CoreMapAttributeAggregator> aggregators)

CoreMapAggregator

public CoreMapAggregator(java.util.Map<java.lang.Class,CoreMapAttributeAggregator> aggregators,
                         java.lang.Class mergedKey)
Method Detail

merge

public CoreMap merge(java.util.List<? extends CoreMap> in,
                     int start,
                     int end)

apply

public CoreMap apply(java.util.List<? extends CoreMap> in)
Description copied from interface: Function
Converts a T1 to a different T2. For example, a Parser will convert a Sentence to a Tree. A Tagger will convert a Sentence to a TaggedSentence.

Specified by:
apply in interface Function<java.util.List<? extends CoreMap>,CoreMap>
Parameters:
in - The function's argument
Returns:
The function's evaluated value

getDefaultAggregator

public static CoreMapAggregator getDefaultAggregator()

getAggregator

public static CoreMapAggregator getAggregator(java.util.Map<java.lang.Class,CoreMapAttributeAggregator> aggregators)

getAggregator

public static CoreMapAggregator getAggregator(java.util.Map<java.lang.Class,CoreMapAttributeAggregator> aggregators,
                                              java.lang.Class key)

merge

public java.util.List<CoreMap> merge(java.util.List<? extends CoreMap> list,
                                     java.util.List<? extends HasInterval<java.lang.Integer>> matched)

merge

public <M> java.util.List<CoreMap> merge(java.util.List<? extends CoreMap> list,
                                         java.util.List<M> matched,
                                         Function<M,Interval<java.lang.Integer>> toIntervalFunc)


Stanford NLP Group