|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
edu.stanford.nlp.trees.Tree
edu.stanford.nlp.trees.SimpleTree
public class SimpleTree
A SimpleTree
is a minimal concrete implementation of an
unlabeled, unscored Tree
. It has a tree structure, but no
annotation at nodes.
Field Summary |
---|
Fields inherited from class edu.stanford.nlp.trees.Tree |
---|
ZEROCHILDREN |
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)
Sets the children of this Tree . |
TreeFactory |
treeFactory()
Return a TreeFactory that produces trees of the
SimpleTree type. |
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, finalize, getClass, notify, notifyAll, wait, wait, wait |
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
. If given
null
, this method sets the Tree's children to a
unique zero-length Tree[] array.
setChildren
in class Tree
children
- An array of child treesTree.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 |