Class Debinarizer
- java.lang.Object
-
- edu.stanford.nlp.parser.lexparser.Debinarizer
-
- All Implemented Interfaces:
TreeTransformer,Function<Tree,Tree>
public class Debinarizer extends Object implements TreeTransformer
Debinarizes a binary tree from the parser. Node values with a '@' in them anywhere are assumed to be inserted nodes for the purpose of binarization, and are removed. The code also removes the last child of the root node, assuming that it is an inserted dependency root.
-
-
Constructor Summary
Constructors Constructor Description Debinarizer(boolean forceCNF)Debinarizer(boolean forceCNF, LabelFactory lf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TreetransformTree(Tree t)Does whatever one needs to do to a particular tree.protected TreetransformTreeHelper(Tree t)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface edu.stanford.nlp.trees.TreeTransformer
apply
-
-
-
-
Constructor Detail
-
Debinarizer
public Debinarizer(boolean forceCNF)
-
Debinarizer
public Debinarizer(boolean forceCNF, LabelFactory lf)
-
-
Method Detail
-
transformTree
public Tree transformTree(Tree t)
Description copied from interface:TreeTransformerDoes whatever one needs to do to a particular tree. This routine is passed a wholeTree, and could itself work recursively, but the canonical usage is to invoke this method via theTree.transform()method, which will apply the transformer in a bottom-up manner to each localTree, and hence the implementation ofTreeTransformershould merely examine and change a local (one-level)Tree.- Specified by:
transformTreein interfaceTreeTransformer- Parameters:
t- A tree. Classes implementing this interface can assume that the tree passed in is notnull.- Returns:
- The transformed
Tree
-
-