List of usage examples for edu.stanford.nlp.parser.lexparser TreeAnnotatorAndBinarizer TreeAnnotatorAndBinarizer
public TreeAnnotatorAndBinarizer(TreebankLangParserParams tlpParams, boolean forceCNF, boolean insideFactor, boolean doSubcategorization, Options op)
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); }