public class KBestSequenceFinder extends java.lang.Object implements BestSequenceFinder
Constructor and Description |
---|
KBestSequenceFinder() |
Modifier and Type | Method and Description |
---|---|
int[] |
bestSequence(SequenceModel ts)
Runs the Viterbi algorithm on the sequence model
in order to find the best sequence.
|
Counter<int[]> |
kBestSequences(SequenceModel ts,
int k)
Runs the Viterbi algorithm on the sequence model, and then proceeds to efficiently
backwards decode the best k label sequence assignments.
|
public int[] bestSequence(SequenceModel ts)
bestSequence
in interface BestSequenceFinder
public Counter<int[]> kBestSequences(SequenceModel ts, int k)
ts
- The SequenceModel to find the best k label sequence assignments ofk
- The number of top-scoring assignments to find.