public class FastFactoredParser extends java.lang.Object implements KBestViterbiParser
| Modifier and Type | Field and Description |
|---|---|
protected MLEDependencyGrammar |
dg |
protected Options |
op |
protected ExhaustivePCFGParser |
pparser |
protected GrammarProjection |
projection |
protected static boolean |
VERBOSE |
| Modifier and Type | Method and Description |
|---|---|
Tree |
getBestParse()
Return the best parse of the sentence most recently parsed.
|
java.util.List<ScoredObject<Tree>> |
getBestParses()
Get a complete set of the maximally scoring parses for a sentence,
rather than one chosen at random.
|
double |
getBestScore()
Gets the score (typically a log probability) of the best
parse of a sentence.
|
java.util.List<ScoredObject<Tree>> |
getKBestParses(int k)
Get the exact k best parses for the sentence.
|
java.util.List<ScoredObject<Tree>> |
getKGoodParses(int k)
Return the list of N "good" parses of the sentence most recently parsed.
|
java.util.List<ScoredObject<Tree>> |
getKSampledParses(int k)
Get k parse samples for the sentence.
|
boolean |
hasParse()
Does the sentence in the last call to parse() have a parse?
In theory this method shouldn't be here, but it seemed a
convenient place to put it for our more general parser interface.
|
boolean |
parse(java.util.List<? extends HasWord> words)
Parse a Sentence.
|
protected int |
project(int state) |
protected static final boolean VERBOSE
protected ExhaustivePCFGParser pparser
protected GrammarProjection projection
protected MLEDependencyGrammar dg
protected Options op
protected int project(int state)
public Tree getBestParse()
getBestParse in interface ViterbiParserpublic double getBestScore()
KBestViterbiParsergetBestScore in interface KBestViterbiParserpublic boolean hasParse()
KBestViterbiParserhasParse in interface KBestViterbiParserpublic java.util.List<ScoredObject<Tree>> getKGoodParses(int k)
getKGoodParses in interface KBestViterbiParserk - The number of good parses to returnpublic boolean parse(java.util.List<? extends HasWord> words)
public java.util.List<ScoredObject<Tree>> getKBestParses(int k)
getKBestParses in interface KBestViterbiParserk - The number of best parses to returnpublic java.util.List<ScoredObject<Tree>> getBestParses()
getBestParses in interface KBestViterbiParserpublic java.util.List<ScoredObject<Tree>> getKSampledParses(int k)
getKSampledParses in interface KBestViterbiParserk - The number of sampled parses to return