public class DependencyTreeTransformer extends java.lang.Object implements TreeTransformer
Modifier and Type | Field and Description |
---|---|
protected TreebankLanguagePack |
tlp |
Constructor and Description |
---|
DependencyTreeTransformer() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
cleanUpLabel(java.lang.String label) |
protected static java.lang.String |
cleanUpRoot(java.lang.String label) |
protected static Tree |
stripEmptyNode(Tree t) |
protected void |
stripTag(Tree t) |
Tree |
transformTree(Tree t)
Does whatever one needs to do to a particular tree.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply
protected final TreebankLanguagePack tlp
public Tree transformTree(Tree t)
TreeTransformer
Tree
, 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 TreeTransformer
t
- A tree. Classes implementing this interface can assume
that the tree passed in is not null
.Tree
protected static java.lang.String cleanUpRoot(java.lang.String label)
protected java.lang.String cleanUpLabel(java.lang.String label)
protected void stripTag(Tree t)