|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.stanford.nlp.parser.lexparser.LexicalizedParserQuery
public class LexicalizedParserQuery
| Field Summary | |
|---|---|
protected Function<java.util.List<? extends HasWord>,java.util.ArrayList<TaggedWord>> |
tagger
The tagger optionally used before parsing. |
| Method Summary | |
|---|---|
Tree |
getBestParse()
Return the best parse of the sentence most recently parsed. |
java.util.List<ScoredObject<Tree>> |
getKBestPCFGParses(int k)
Returns the trees (and scores) corresponding to the k-best derivations of the sentence. |
java.util.List<ScoredObject<Tree>> |
getKGoodFactoredParses(int k)
|
double |
getPCFGScore()
|
TreePrint |
getTreePrint()
Return a TreePrint for formatting parsed output trees. |
boolean |
parse(java.util.List<? extends HasWord> sentence)
Parse a sentence represented as a List of tokens. |
void |
setConstraints(java.util.List<ParserConstraint> constraints)
|
double |
testOnTreebank(Treebank testTreebank)
Test the parser on a treebank. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Function<java.util.List<? extends HasWord>,java.util.ArrayList<TaggedWord>> tagger
| Method Detail |
|---|
public void setConstraints(java.util.List<ParserConstraint> constraints)
public boolean parse(java.util.List<? extends HasWord> sentence)
sentence - The sentence to parse
java.lang.UnsupportedOperationException - If the Sentence is too long or
of zero length or the parse
otherwise fails for resource reasonspublic Tree getBestParse()
java.util.NoSuchElementException - If no previously successfully parsed
sentencepublic java.util.List<ScoredObject<Tree>> getKGoodFactoredParses(int k)
public java.util.List<ScoredObject<Tree>> getKBestPCFGParses(int k)
k - The number of best parses to return
public double getPCFGScore()
public double testOnTreebank(Treebank testTreebank)
op.testOptions.verbose is true.
testTreebank - The treebank to parse
public TreePrint getTreePrint()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||