Java edu.stanford.nlp.trees Tree fields, constructors, methods, implement or subclass

Example usage for Java edu.stanford.nlp.trees Tree fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for edu.stanford.nlp.trees Tree.

The text is from its open source code.

Subclass

edu.stanford.nlp.trees.Tree has subclasses.
Click this link to see all its subclasses.

Method

voidaddChild(Tree t)
Adds the tree t at the last index position among the daughters.
voidaddChild(int i, Tree t)
Adds the tree t at the index position among the daughters.
Treeancestor(int height, Tree root)
Return the ancestor tree node height nodes up from the current node.
Tree[]children()
Returns an array of children for the current node.
Setconstituents()
Returns the Constituents generated by the parse tree.
TreedeepCopy()
Makes a deep copy of not only the Tree structure but of the labels as well.
TreedeepCopy(TreeFactory tf, LabelFactory lf)
Makes a deep copy of not only the Tree structure but of the labels as well.
intdepth()
Finds the depth of the tree.
booleandominates(Tree t)
Returns true if this dominates the Tree passed in as an argument.
ListdominationPath(Tree t)
Returns the path of nodes leading down to a dominated node, including this and the dominated node itself.
booleanequals(Object o)
Implements equality for Tree's.
TreefirstChild()
Returns the first child of a tree, or null if none.
TreegetChild(int i)
Return the child at some daughter index.
ListgetChildrenAsList()
Returns a List of children for the current node.
ListgetLeaves()
Gets the leaves of the tree.
TreegetNodeNumber(int i)
Fetches the i th node in the tree, with node numbers defined as in #nodeNumber(Tree) .
IntPairgetSpan()
Returns SpanAnnotation of this node, or null if annotation is not assigned.
TreeheadPreTerminal(HeadFinder hf)
Returns the preterminal tree that is the head of the tree.
TreeheadTerminal(HeadFinder hf)
Returns the tree leaf that is the head of the tree.
voidindentedListPrint()
Indented list printing of a tree.
voidindexLeaves()
Assign sequential integer indices to the leaves of the tree rooted at this Tree , starting with 1.
voidindexSpans()
Index all spans (constituents) in the tree.
voidindexSpans(int startIndex)
PairindexSpans(MutableInteger startIndex)
Assigns span indices (BeginIndexAnnotation and EndIndexAnnotation) to all nodes in a tree.
booleanisLeaf()
Says whether a node is a leaf.
booleanisPhrasal()
Return whether this node is a phrasal node or not.
booleanisPrePreTerminal()
Return whether all the children of this node are preterminals or not.
booleanisPreTerminal()
Return whether this node is a preterminal or not.
Iteratoriterator()
Returns an iterator over all the nodes of the tree.
Labellabel()
Returns the label associated with the current node, or null if there is no label.
ListlabeledYield()
TreelastChild()
Returns the last child of a tree, or null if none.
intleftCharEdge(Tree node)
Returns the positional index of the left edge of node within the tree, as measured by characters.
intnodeNumber(Tree root)
Calculates the node's number, defined as the number of nodes traversed in a left-to-right, depth-first search of the tree starting at root and ending at this .
StringnodeString()
Returns the value of the node's label as a String.
intnumChildren()
Says how many children a tree node has in its local tree.
intobjectIndexOf(Tree tree)
Returns the position of a Tree in the children list, if present, or -1 if it is not present.
Treeparent(Tree root)
Return the parent of the tree node.
ListpathNodeToNode(Tree t1, Tree t2)
Given nodes t1 and t2 which are dominated by this node, returns a list of all the nodes on the path from t1 to t2, inclusive, or null if none found.
voidpennPrint()
Print the tree as done in Penn Treebank merged files.
voidpennPrint(PrintWriter pw)
Print the tree as done in Penn Treebank merged files.
voidpennPrint(PrintStream ps)
Print the tree as done in Penn Treebank merged files.
StringpennString()
Calls pennPrint() and saves output to a String
ListpreOrderNodeList()
ListpreTerminalYield()
Gets the preterminal yield (i.e., tags) of the tree.
Treeprune(final Predicate filter)
Creates a deep copy of the tree, where all nodes that the filter does not accept and all children of such nodes are pruned.
TreeremoveChild(int i)
Destructively removes the child at some daughter index and returns it.
intrightCharEdge(Tree node)
Returns the positional index of the right edge of node within the tree, as measured by characters.
doublescore()
Returns the score associated with the current node, or NaN if there is no score.
TreesetChild(int i, Tree t)
Replaces the i th child of this with the tree t.
voidsetChildren(Tree[] children)
Set the children of this node to be the children given in the array.
voidsetChildren(List childTreesList)
Set the children of this tree node to the given list.
voidsetLabel(Label label)
Sets the label associated with the current node, if there is one.
voidsetScore(double score)
Sets the score associated with the current node, if there is one.
voidsetSpans()
Assign a SpanAnnotation on each node of this tree.
voidsetValue(String value)
Listsiblings(Tree root)
Returns the siblings of this Tree node.
intsize()
Returns the number of nodes the tree contains.
TreeskipRoot()
Returns first child if this is unary and if the label at the current node is either "ROOT" or empty.
ListsubTreeList()
Get the list of all subtrees inside the tree by returning a tree rooted at each node.
ListtaggedLabeledYield()
Returns a List from the tree.
ArrayListtaggedYield()
Gets the tagged yield of the tree.
StringtoString()
Converts parse tree to string in Penn Treebank format.
StringBuildertoStringBuilder(StringBuilder sb)
Appends the printed form of a parse tree (as a bracketed String) to a StringBuilder .
Treetransform(final TreeTransformer transformer)
Create a transformed Tree.
TreeFactorytreeFactory()
Return a TreeFactory that produces trees of the appropriate type.
Stringvalue()
TreevalueOf(String str)
This gives you a tree from a String representation (as a bracketed Tree, of the kind produced by toString() , pennPrint() , or as in the Penn Treebank).
ArrayListyield()
Gets the yield of the tree.
ArrayListyieldWords()