public class SimpleTree extends Tree
SimpleTree is a minimal concrete implementation of an
unlabeled, unscored Tree. It has a tree structure, but
nothing is stored at a node (no label or score).
So, most of the time, this is the wrong class to use!
Look at LabeledScoredTreeNode.EMPTY_TREE_ARRAY| Constructor and Description |
|---|
SimpleTree()
Create an empty parse tree.
|
SimpleTree(Label label)
Create parse tree with given root and null daughters.
|
SimpleTree(Label label,
java.util.List<Tree> daughterTreesList)
Create parse tree with given root and array of daughter trees.
|
| Modifier and Type | Method and Description |
|---|---|
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. |
addChild, addChild, ancestor, cCommands, constituents, constituents, constituents, constituents, constituents, deepCopy, deepCopy, deepCopy, dependencies, dependencies, dependencies, depth, depth, dominates, dominationPath, equals, firstChild, flatten, flatten, getChild, getChildrenAsList, getLeaves, getLeaves, getNodeNumber, getSpan, hashCode, headPreTerminal, headTerminal, headTerminal, indentedListPrint, indentedListPrint, indentedXMLPrint, indentedXMLPrint, indexLeaves, indexLeaves, indexLeaves, indexSpans, indexSpans, indexSpans, insertDtr, isLeaf, isPhrasal, isPrePreTerminal, isPreTerminal, isUnaryRewrite, iterator, joinNode, label, labeledYield, labeledYield, labelFactory, labels, lastChild, leftCharEdge, localTree, localTrees, mapDependencies, mapDependencies, nodeNumber, nodeString, numChildren, objectIndexOf, parent, parent, pathNodeToNode, pennPrint, pennPrint, pennPrint, pennPrint, pennPrint, pennString, percolateHeadAnnotations, percolateHeadIndices, percolateHeads, postOrderNodeList, preOrderNodeList, preTerminalYield, preTerminalYield, printLocalTree, printLocalTree, prune, prune, removeChild, rightCharEdge, score, setChild, setChildren, setFromString, setLabel, setLabels, setScore, setSpans, setValue, siblings, size, skipRoot, spliceOut, spliceOut, subTreeList, subTrees, subTrees, taggedLabeledYield, taggedYield, taggedYield, toString, toStringBuilder, toStringBuilder, transform, transform, treeSkeletonConstituentCopy, treeSkeletonConstituentCopy, treeSkeletonCopy, treeSkeletonCopy, upperMostUnary, value, valueOf, valueOf, yield, yield, yield, yieldHasWord, yieldHasWord, yieldWords, yieldWordsadd, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArraypublic SimpleTree()
public SimpleTree(Label label)
label - root label of new tree to construct. For a SimpleTree
this parameter is ignored.public Tree[] children()
children in class TreeTree.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 Treechildren - 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 Treepublic static TreeFactory factory()
TreeFactory that produces trees of the
SimpleTree type.
The factory returned is always the same one (a singleton).