|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.trees.Trees
public class Trees
Various utilities for the Tree
class.
Constructor Summary | |
---|---|
Trees()
|
Method Summary | |
---|---|
static Tree |
applyToProjections(TreeVisitor v,
Tree head,
Tree root,
HeadFinder hf)
|
static Tree |
getPreTerminal(Tree tree,
int n)
gets the n th preterminal in tree . |
static Tree |
getTerminal(Tree tree,
int n)
gets the n th terminal in tree . |
static boolean |
heads(Tree head,
Tree node,
HeadFinder hf)
returns true iff head (transitively) heads node |
static List |
leaves(Tree t)
returns the leaves in a Tree in the order that they're found. |
static int |
leftEdge(Tree t,
Tree root)
Returns the positional index of the left edge of a tree t within a given root, as defined by the size of the yield of all material preceding t. |
static Tree |
lexicalize(Tree t,
HeadFinder hf)
Returns a lexicalized Tree whose Labels are CategoryWordTag instances, all corresponds to the input tree. |
static List |
localTreeAsCatList(Tree t)
returns the syntactic category of the tree as a list of the syntactic categories of the mother and the daughters |
static Tree |
maximalProjection(Tree head,
Tree root,
HeadFinder hf)
returns the maximal projection of head in
root given a HeadFinder |
static int |
objectEqualityIndexOf(Tree parent,
Tree daughter)
Returns the index of daughter in parent by ==. |
static int |
rightEdge(Tree t,
Tree root)
Returns the positional index of the right edge of a tree t within a given root, as defined by the size of the yield of all material preceding t plus all the material contained in t. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Trees()
Method Detail |
---|
public static int leftEdge(Tree t, Tree root)
public static int rightEdge(Tree t, Tree root)
public static Tree lexicalize(Tree t, HeadFinder hf)
public static List leaves(Tree t)
public static boolean heads(Tree head, Tree node, HeadFinder hf)
head
(transitively) heads node
public static Tree maximalProjection(Tree head, Tree root, HeadFinder hf)
head
in
root
given a HeadFinder
public static Tree applyToProjections(TreeVisitor v, Tree head, Tree root, HeadFinder hf)
public static Tree getTerminal(Tree tree, int n)
n
th terminal in tree
. The first terminal is number zero.
public static Tree getPreTerminal(Tree tree, int n)
n
th preterminal in tree
. The first terminal is number zero.
public static List localTreeAsCatList(Tree t)
public static int objectEqualityIndexOf(Tree parent, Tree daughter)
daughter
in parent
by ==.
Returns -1 if daughter
not found.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |