public class CreateSubtreeNode extends TsurgeonPattern
| Constructor and Description |
|---|
CreateSubtreeNode(TsurgeonPattern start,
java.lang.String newLabel) |
CreateSubtreeNode(TsurgeonPattern start,
TsurgeonPattern end,
java.lang.String newLabel) |
| Modifier and Type | Method and Description |
|---|---|
Tree |
evaluate(Tree t,
TregexMatcher tm)
Combines all nodes between start and end into one subtree, then
replaces those nodes with the new subtree in the corresponding
location under parent
|
setRoot, toStringpublic CreateSubtreeNode(TsurgeonPattern start, java.lang.String newLabel)
public CreateSubtreeNode(TsurgeonPattern start, TsurgeonPattern end, java.lang.String newLabel)
public Tree evaluate(Tree t, TregexMatcher tm)
evaluate in class TsurgeonPatternt - The Tree that has been matched upon; typically this tree will be destructively modified.tm - The successfully matched TregexMatcher.