public class TreeAnnotatorAndBinarizer extends java.lang.Object implements TreeTransformer
Constructor and Description |
---|
TreeAnnotatorAndBinarizer(HeadFinder annotationHF,
HeadFinder binarizationHF,
TreebankLangParserParams tlpParams,
boolean forceCNF,
boolean insideFactor,
boolean doSubcategorization,
Options op) |
TreeAnnotatorAndBinarizer(TreebankLangParserParams tlpParams,
boolean forceCNF,
boolean insideFactor,
boolean doSubcategorization,
Options op) |
Modifier and Type | Method and Description |
---|---|
void |
addRoot(Tree t)
Changes the ROOT label, and adds a Lexicon.BOUNDARY daughter to it.
|
void |
dumpStats() |
static Triple<Treebank,Treebank,Treebank> |
getAnnotatedBinaryTreebankFromTreebank(Treebank trainTreebank,
Treebank secondaryTreebank,
Treebank tuneTreebank,
Options op) |
static void |
main(java.lang.String[] args)
Lets you test out the TreeAnnotatorAndBinarizer on the command line.
|
void |
printRuleCounts() |
void |
printStateCounts() |
void |
setDoSelectiveSplit(boolean doSelectiveSplit) |
Tree |
transformTree(Tree t)
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply
public TreeAnnotatorAndBinarizer(TreebankLangParserParams tlpParams, boolean forceCNF, boolean insideFactor, boolean doSubcategorization, Options op)
public TreeAnnotatorAndBinarizer(HeadFinder annotationHF, HeadFinder binarizationHF, TreebankLangParserParams tlpParams, boolean forceCNF, boolean insideFactor, boolean doSubcategorization, Options op)
public void dumpStats()
public void setDoSelectiveSplit(boolean doSelectiveSplit)
public void addRoot(Tree t)
t
- The current tree into which a boundary is insertedpublic Tree transformTree(Tree t)
transformTree
in interface TreeTransformer
t
- A tree. Classes implementing this interface can assume
that the tree passed in is not null
.Tree
public void printRuleCounts()
public void printStateCounts()
public static Triple<Treebank,Treebank,Treebank> getAnnotatedBinaryTreebankFromTreebank(Treebank trainTreebank, Treebank secondaryTreebank, Treebank tuneTreebank, Options op)
public static void main(java.lang.String[] args)
args
- Command line arguments: All flags accepted by FactoredParser.setOptionFlag
and -train treebankPath [fileRanges]