|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.AbstractCollection | +--edu.stanford.nlp.trees.Tree | +--edu.stanford.nlp.trees.SimpleTree
A SimpleTree
is a minimal concrete implementation of an
unlabeled, unscored Tree
. It has a tree structure, but no
annotation at nodes.
Constructor Summary | |
SimpleTree()
Create an empty parse tree. |
|
SimpleTree(Label label)
Create parse tree with given root and null daughters. |
|
SimpleTree(Label label,
List daughterTreesList)
Create parse tree with given root and array of daughter trees. |
Method Summary | |
Tree[] |
children()
Returns an array of children for the current node, or null if it is a leaf. |
static TreeFactory |
factory()
Return a TreeFactory that produces trees of the
SimpleTree type. |
void |
setChildren(Tree[] children)
Set the children of this node to be the children given in the array. |
TreeFactory |
treeFactory()
Return a TreeFactory that produces trees of the
SimpleTree type. |
Methods inherited from class edu.stanford.nlp.trees.Tree |
constituents, constituents, deepCopy, deepCopy, depth, firstChild, getChildrenAsList, indentedListPrint, indentedListPrint, isLeaf, isPreTerminal, iterator, label, labels, lastChild, parent, parent, pennPrint, pennPrint, percolateHeads, preTerminalYield, preTerminalYield, prune, prune, score, setChildren, setLabel, setLabels, setScore, size, spliceOut, spliceOut, subTrees, subTrees, taggedYield, taggedYield, toString, toStringBuffer, transform, transform, yield, yield |
Methods inherited from class java.util.AbstractCollection |
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Collection |
equals, hashCode |
Constructor Detail |
public SimpleTree()
public SimpleTree(Label label)
label
- root label of new tree to construct. For a SimpleTree
this parameter is ignored.public SimpleTree(Label label, List daughterTreesList)
label
- root label of tree to construct. For a SimpleTree
this parameter is ignoreddaughterTreesList
- list of daughter trees to construct.Method Detail |
public Tree[] children()
children
in class Tree
Tree.getChildrenAsList()
public void setChildren(Tree[] children)
Tree
null
if there are no children,
and other methods in this class work on either representation.
setChildren
in class Tree
children
- The array of children, each a Tree
Tree.setChildren(List)
public TreeFactory treeFactory()
TreeFactory
that produces trees of the
SimpleTree
type.
The factory returned is always the same one (a singleton).
treeFactory
in class Tree
public static TreeFactory factory()
TreeFactory
that produces trees of the
SimpleTree
type.
The factory returned is always the same one (a singleton).
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |