|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--edu.stanford.nlp.trees.SimpleTreeFactory
|
+--edu.stanford.nlp.trees.LabeledScoredTreeFactory
A LabeledScoredTreeFactory acts as a factory for creating
trees with labels and scores. Unless another LabelFactory
is supplied, it will use a StringLabel by default.
| Constructor Summary | |
LabeledScoredTreeFactory()
Make a TreeFactory that uses LabeledScoredTree trees, where the labels are of class StringLabel |
|
LabeledScoredTreeFactory(LabelFactory lf)
Make a treefactory that uses LabeledScoredTree trees, where the labels are as specified by the user. |
|
| Method Summary | |
Tree |
newLeaf(Label label)
Create a new leaf node with the given label |
Tree |
newLeaf(String word)
Create a new tree leaf node, where the label is formed from the String passed in. |
Tree |
newTreeNode(Label parentLabel,
List children)
Create a new non-leaf tree node with the given label |
Tree |
newTreeNode(String parent,
List children)
Create a new tree nonleaf node, where the label is formed from the String passed in. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LabeledScoredTreeFactory()
public LabeledScoredTreeFactory(LabelFactory lf)
lf - the LabelFactory to be used to create labels| Method Detail |
public Tree newLeaf(String word)
TreeFactoryString passed in.
newLeaf in interface TreeFactorynewLeaf in class SimpleTreeFactoryword - The word that will go into the tree label.
public Tree newLeaf(Label label)
newLeaf in interface TreeFactorynewLeaf in class SimpleTreeFactorylabel - the label for the leaf node
public Tree newTreeNode(String parent,
List children)
TreeFactoryString passed in.
newTreeNode in interface TreeFactorynewTreeNode in class SimpleTreeFactoryparent - The string that will go into the parent tree label.children - The list of daughters of this tree. The children
may be a (possibly empty) List of children or
null
public Tree newTreeNode(Label parentLabel,
List children)
newTreeNode in interface TreeFactorynewTreeNode in class SimpleTreeFactoryparentLabel - The label for the nodechildren - A List of the children of this node,
each of which should itself be a LabeledScoredTree
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||