edu.stanford.nlp.ling.tokensregex
Class MultiCoreMapNodePattern
java.lang.Object
edu.stanford.nlp.ling.tokensregex.MultiNodePattern<CoreMap>
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
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiCoreMapNodePattern
public MultiCoreMapNodePattern()
MultiCoreMapNodePattern
public MultiCoreMapNodePattern(NodePattern nodePattern)
MultiCoreMapNodePattern
public MultiCoreMapNodePattern(NodePattern nodePattern,
java.util.Map<java.lang.Class,CoreMapAttributeAggregator> aggregators)
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