|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.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 produces LabeledScoredTree trees. |
|
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()
StringLabel
.
public LabeledScoredTreeFactory(LabelFactory lf)
lf
- the LabelFactory
to be used to create labelsMethod Detail |
public Tree newLeaf(String word)
TreeFactory
String
passed in.
newLeaf
in interface TreeFactory
newLeaf
in class SimpleTreeFactory
public Tree newLeaf(Label label)
newLeaf
in interface TreeFactory
newLeaf
in class SimpleTreeFactory
label
- the label for the leaf node
public Tree newTreeNode(String parent, List children)
TreeFactory
String
passed in.
newTreeNode
in interface TreeFactory
newTreeNode
in class SimpleTreeFactory
public Tree newTreeNode(Label parentLabel, List children)
newTreeNode
in interface TreeFactory
newTreeNode
in class SimpleTreeFactory
parentLabel
- 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 |