public interface KBestViterbiParser extends ViterbiParser
Modifier and Type | Method and Description |
---|---|
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)
Get k good parses for the sentence.
|
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.
|
getBestParse
java.util.List<ScoredObject<Tree>> getKBestParses(int k)
k
- The number of best parses to returnjava.util.List<ScoredObject<Tree>> getBestParses()
java.util.List<ScoredObject<Tree>> getKGoodParses(int k)
k
- The number of good parses to returnjava.util.List<ScoredObject<Tree>> getKSampledParses(int k)
k
- The number of sampled parses to returnboolean hasParse()
double getBestScore()