|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sen.dictionary.Viterbi
public class Viterbi
An implementation of the Viterbi algorithm used to find the most likely sequence of morphemes comprising a sentence
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 Summary | |
|---|---|
Viterbi(Tokenizer tokenizer)
Creates a Viterbi instance using the given Tokenizer |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Viterbi(Tokenizer tokenizer)
tokenizer - The Tokenizer to use| Method Detail |
|---|
public List<Token> getPossibleTokens(Sentence sentence,
int position)
throws IOException
sentence - The Sentence to search withinposition - The position to search at
IOException
public List<Token> getBestTokens(Sentence sentence,
List<Token> reuse)
throws IOException
sentence - The sentence to analyse
IOException
@Deprecated
public List<Token> getBestTokens(Sentence sentence)
throws IOException
getBestTokens(Sentence, List) instead
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||