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

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

Introduction

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

Prototype

public TreeAnnotatorAndBinarizer(TreebankLangParserParams tlpParams, boolean forceCNF, boolean insideFactor,
            boolean doSubcategorization, Options op) 

Source Link

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  w  w w.  ja v  a  2 s  . c  om
    return op.tlpParams.subcategoryStripper().transformTree(new Debinarizer(op.forceCNF).transformTree(tree));
    //    return debinarizer.transformTree(t);
}