public abstract class RecursiveTreeTransformer extends java.lang.Object implements TreeTransformer
BasicCategoryTreeTransformer
turns all the non-leaf labels of a tree into their basic categories
given a set of treebank parameters which describe how to turn the
basic categories.
| Constructor and Description |
|---|
RecursiveTreeTransformer() |
| Modifier and Type | Method and Description |
|---|---|
Tree |
transformHelper(Tree tree) |
Label |
transformLabel(Tree tree) |
Tree |
transformNonterminal(Tree tree) |
Label |
transformNonterminalLabel(Tree tree) |
Tree |
transformTerminal(Tree tree) |
Label |
transformTerminalLabel(Tree tree) |
Tree |
transformTree(Tree tree)
Does whatever one needs to do to a particular tree.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplypublic Tree transformTree(Tree tree)
TreeTransformerTree, and could itself
work recursively, but the canonical usage is to invoke this method
via the Tree.transform() method, which will apply the
transformer in a bottom-up manner to each local Tree,
and hence the implementation of TreeTransformer should
merely examine and change a local (one-level) Tree.transformTree in interface TreeTransformertree - A tree. Classes implementing this interface can assume
that the tree passed in is not null.Tree