edu.stanford.nlp.sequences
Class ExactBestSequenceFinder
java.lang.Object
edu.stanford.nlp.sequences.ExactBestSequenceFinder
- All Implemented Interfaces:
- BestSequenceFinder
public class ExactBestSequenceFinder
- extends Object
- implements BestSequenceFinder
A class capable of computing the best sequence given a SequenceModel.
Uses the Viterbi algorithm.
- Author:
- Dan Klein, Teg Grenager (grenager@stanford.edu)
Method Summary |
int[] |
bestSequence(SequenceModel ts)
Runs the Viterbi algorithm on the sequence model given by the TagScorer
in order to find the best sequence. |
static void |
main(String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExactBestSequenceFinder
public ExactBestSequenceFinder()
main
public static void main(String[] args)
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
Stanford NLP Group