public abstract class TsurgeonMatcher
extends java.lang.Object
Tsurgeon
operation separate from the TsurgeonPattern objects.
This makes it easier to reset state between invocations and makes
it easier to use in a threadsafe manner.
newNodeNames or look for appropriate nodes
in newNodeNames when possible.
matcher() took
the tree & tregex instead of evaluate(), but that
is a little more complicated because of the way the
TsurgeonMatcher is used in Tsurgeon.
Basically, you would need to move that code from
Tsurgeon to TsurgeonMatcher.| Constructor and Description |
|---|
TsurgeonMatcher(TsurgeonPattern pattern,
java.util.Map<java.lang.String,Tree> newNodeNames,
edu.stanford.nlp.trees.tregex.tsurgeon.CoindexationGenerator coindexer) |
| Modifier and Type | Method and Description |
|---|---|
abstract Tree |
evaluate(Tree tree,
TregexMatcher tregex)
Evaluates the surgery pattern against a
Tree and a TregexMatcher
that has been successfully matched against the tree. |
public TsurgeonMatcher(TsurgeonPattern pattern, java.util.Map<java.lang.String,Tree> newNodeNames, edu.stanford.nlp.trees.tregex.tsurgeon.CoindexationGenerator coindexer)
public abstract Tree evaluate(Tree tree, TregexMatcher tregex)
Tree and a TregexMatcher
that has been successfully matched against the tree.tree - The Tree that has been matched upon; typically this tree will be destructively modified.tregex - The successfully matched TregexMatcher.