Example usage for edu.stanford.nlp.parser.lexparser TreeAnnotatorAndBinarizer transformTree

List of usage examples for edu.stanford.nlp.parser.lexparser TreeAnnotatorAndBinarizer transformTree

Introduction

In this page you can find the example usage for edu.stanford.nlp.parser.lexparser TreeAnnotatorAndBinarizer transformTree.

Prototype

@Override
public Tree transformTree(Tree t) 

Source Link

Document

The tree t is normally expected to be a Penn-Treebank-style tree in which the top node is an extra node that has a unary expansion.

Usage

From source file:conditionalCFG.ConditionalCFGParser.java

License:Open Source License

public Tree scoreNonBinarizedTree(Tree tree) {
    TreeAnnotatorAndBinarizer binarizer = new TreeAnnotatorAndBinarizer(op.tlpParams, op.forceCNF,
            !op.trainOptions.outsideFactor(), true, op);
    tree = binarizer.transformTree(tree);
    scoreBinarizedTree(tree, 0);/*from   ww  w.j  av  a 2 s . co  m*/
    return op.tlpParams.subcategoryStripper().transformTree(new Debinarizer(op.forceCNF).transformTree(tree));
    //    return debinarizer.transformTree(t);
}