|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umn.cs.nlp.parser.ParseTree
public class ParseTree
Represents a parse tree.
Field Summary | |
---|---|
static ParseTree |
NULL_PARSE
Constant used to denote an empty parse tree. |
Constructor Summary | |
---|---|
ParseTree(String root)
Constructs a parse tree with no children, with logProb of 0.0 . |
|
ParseTree(String root,
double logProb)
Constructs a parse tree with no children. |
|
ParseTree(String root,
double logProb,
ParseTree... children)
Constructs a parse tree with provided children. |
|
ParseTree(String root,
ParseTree... children)
Constructs a parse tree with provided children, with logProb of 0.0 . |
Method Summary | |
---|---|
void |
addChild(ParseTree child)
|
void |
addChildren(Collection<ParseTree> children)
|
ParseTree |
getChild(int index)
|
double |
getLogProb()
|
int |
getNumberOfChildren()
|
String |
getRoot()
|
boolean |
isLeaf()
|
void |
setLogProb(double logProb)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ParseTree NULL_PARSE
Double.NEGATIVE_INFINITY
.
Constructor Detail |
---|
public ParseTree(String root)
0.0
.
root
- public ParseTree(String root, double logProb)
root
- logProb
- public ParseTree(String root, ParseTree... children)
0.0
.
root
- children
- public ParseTree(String root, double logProb, ParseTree... children)
root
- logProb
- children
- Method Detail |
---|
public String getRoot()
public ParseTree getChild(int index)
index
- the index of the child to be retrieved
public int getNumberOfChildren()
public void addChild(ParseTree child)
public void addChildren(Collection<ParseTree> children)
public boolean isLeaf()
public String toString()
toString
in class Object
public double getLogProb()
public void setLogProb(double logProb)
logProb
- the logProb to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |