edu.stanford.nlp.sequences
Class KBestSequenceFinder
java.lang.Object
edu.stanford.nlp.sequences.KBestSequenceFinder
- All Implemented Interfaces:
- BestSequenceFinder
public class KBestSequenceFinder
- extends Object
- implements BestSequenceFinder
- Author:
- Jenny Finkel
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
KBestSequenceFinder
public KBestSequenceFinder()
bestSequence
public int[] bestSequence(SequenceModel ts)
- Runs the Viterbi algorithm on the sequence model given by the TagScorer
in order to find the best sequence.
- Specified by:
bestSequence
in interface BestSequenceFinder
- Parameters:
ts
-
- Returns:
- an array containing the int tags of the best sequence
kBestSequences
public ClassicCounter<int[]> kBestSequences(SequenceModel ts,
int k)
Stanford NLP Group