edu.stanford.nlp.ling.tokensregex
Class MultiCoreMapNodePattern

java.lang.Object
  extended by edu.stanford.nlp.ling.tokensregex.MultiNodePattern<CoreMap>
      extended by edu.stanford.nlp.ling.tokensregex.MultiCoreMapNodePattern

public class MultiCoreMapNodePattern
extends MultiNodePattern<CoreMap>

Pattern for matching across multiple core maps.

This class allows for string matches across tokens. It is not implemented efficiently (it basically creates a big pretend token and tries to do string match on that) so can be expensive to use. Whenever possible, SequencePattern should be used instead.

Author:
Angel Chang

Nested Class Summary
static class MultiCoreMapNodePattern.StringSequenceAnnotationPattern
           
 
Nested classes/interfaces inherited from class edu.stanford.nlp.ling.tokensregex.MultiNodePattern
MultiNodePattern.IntersectMultiNodePattern<T>, MultiNodePattern.UnionMultiNodePattern<T>
 
Constructor Summary
MultiCoreMapNodePattern()
           
MultiCoreMapNodePattern(NodePattern nodePattern)
           
MultiCoreMapNodePattern(NodePattern nodePattern, java.util.Map<java.lang.Class,CoreMapAttributeAggregator> aggregators)
           
 
Method Summary
protected  java.util.Collection<Interval<java.lang.Integer>> match(java.util.List<? extends CoreMap> nodes, int start)
          Tries to match sequence of nodes starting of start Returns intervals (token offsets) of when the nodes matches
 
Methods inherited from class edu.stanford.nlp.ling.tokensregex.MultiNodePattern
getMaxNodes, getMinNodes, setMaxNodes, setMinNodes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiCoreMapNodePattern

public MultiCoreMapNodePattern()

MultiCoreMapNodePattern

public MultiCoreMapNodePattern(NodePattern nodePattern)

MultiCoreMapNodePattern

public MultiCoreMapNodePattern(NodePattern nodePattern,
                               java.util.Map<java.lang.Class,CoreMapAttributeAggregator> aggregators)
Method Detail

match

protected java.util.Collection<Interval<java.lang.Integer>> match(java.util.List<? extends CoreMap> nodes,
                                                                  int start)
Description copied from class: MultiNodePattern
Tries to match sequence of nodes starting of start Returns intervals (token offsets) of when the nodes matches

Specified by:
match in class MultiNodePattern<CoreMap>


Stanford NLP Group