|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.trees.SimpleTreeFactory
public class SimpleTreeFactory
A SimpleTreeFactory
acts as a factory for creating objects
of class SimpleTree
.
Constructor Summary | |
---|---|
SimpleTreeFactory()
Creates a new TreeFactory . |
|
SimpleTreeFactory(LabelFactory lf)
Creates a new TreeFactory . |
Method Summary | |
---|---|
Tree |
newLeaf(Label word)
Create a new tree 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 tree nonleaf 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 SimpleTreeFactory()
TreeFactory
. A
SimpleTree
stores no Label
, so no
LabelFactory
is built.
public SimpleTreeFactory(LabelFactory lf)
TreeFactory
. A
SimpleTree
stores no Label
, so the
LabelFactory
argument is ignored.
lf
- This argument is ignoredMethod Detail |
---|
public Tree newLeaf(String word)
TreeFactory
String
passed in.
newLeaf
in interface TreeFactory
word
- The word that will go into the tree label.
public Tree newLeaf(Label word)
TreeFactory
newLeaf
in interface TreeFactory
word
- The label for the leaf node
public Tree newTreeNode(String parent, List children)
TreeFactory
String
passed in.
newTreeNode
in interface TreeFactory
parent
- 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)
TreeFactory
newTreeNode
in interface TreeFactory
parentLabel
- The label for the parent tree node.children
- The list of daughters of this tree. The children
may be a (possibly empty) List
of children or
null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |