edu.stanford.nlp.trees.tregex.tsurgeon
Class TsurgeonPattern
java.lang.Object
edu.stanford.nlp.trees.tregex.tsurgeon.TsurgeonPattern
- Direct Known Subclasses:
- CoindexNodes
public abstract class TsurgeonPattern
- extends Object
An abstract class for patterns to manipulate Tree
s when
successfully matched on with a TregexMatcher
.
- Author:
- Roger Levy
EMPTY_TSURGEON_ARRAY
protected static final TsurgeonPattern[] EMPTY_TSURGEON_ARRAY
setRoot
protected void setRoot(edu.stanford.nlp.trees.tregex.tsurgeon.TsurgeonPatternRoot root)
toString
public String toString()
- Overrides:
toString
in class Object
evaluate
public abstract Tree evaluate(Tree t,
TregexMatcher m)
- Evaluates the pattern against a
Tree
and a TregexMatcher
that has been successfully matched against the tree.
- Parameters:
t
- the Tree
that has been matched upon; typically this tree will be destructively modified.m
- the successfully matched TregexMatcher
- Returns:
- some node in the tree; depends on implementation and use of the specific subclass.
Stanford NLP Group