public class Viterbi extends Object
Thread Safety: Objects of this class are NOT thread safe and
should not be accessed simultaneously by multiple threads. Note that creating
additional instances using SenFactory is relatively
cheap in both memory and time
| Constructor and Description |
|---|
Viterbi(Tokenizer tokenizer)
Creates a Viterbi instance using the given Tokenizer
|
| Modifier and Type | Method and Description |
|---|---|
List<Token> |
getBestTokens(Sentence sentence)
Deprecated.
use
getBestTokens(Sentence, List) instead |
List<Token> |
getBestTokens(Sentence sentence,
List<Token> reuse)
Analyses a sentence to find the most likely sequence of morphemes
|
List<Token> |
getPossibleTokens(Sentence sentence,
int position)
Gets the possible tokens from a Sentence at a given position.
|
public Viterbi(Tokenizer tokenizer)
tokenizer - The Tokenizer to usepublic List<Token> getPossibleTokens(Sentence sentence, int position) throws IOException
sentence - The Sentence to search withinposition - The position to search atIOExceptionpublic List<Token> getBestTokens(Sentence sentence, List<Token> reuse) throws IOException
sentence - The sentence to analyseIOException@Deprecated public List<Token> getBestTokens(Sentence sentence) throws IOException
getBestTokens(Sentence, List) insteadIOException