net.java.sen.dictionary
クラス Viterbi

java.lang.Object
  上位を拡張 net.java.sen.dictionary.Viterbi

public class Viterbi
extends java.lang.Object

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


コンストラクタの概要
Viterbi(Tokenizer tokenizer)
          Creates a Viterbi instance using the given Tokenizer
 
メソッドの概要
 java.util.List<Token> getBestTokens(Sentence sentence)
          Analyses a sentence to find the most likely sequence of morphemes
 java.util.List<Token> getPossibleTokens(Sentence sentence, int position)
          Gets the possible tokens from a Sentence at a given position.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

Viterbi

public Viterbi(Tokenizer tokenizer)
Creates a Viterbi instance using the given Tokenizer

パラメータ:
tokenizer - The Tokenizer to use
メソッドの詳細

getPossibleTokens

public java.util.List<Token> getPossibleTokens(Sentence sentence,
                                               int position)
                                        throws java.io.IOException
Gets the possible tokens from a Sentence at a given position. Any reading constraints on the Sentence are ignored

パラメータ:
sentence - The Sentence to search within
position - The position to search at
戻り値:
A list of possible Tokens
例外:
java.io.IOException

getBestTokens

public java.util.List<Token> getBestTokens(Sentence sentence)
                                    throws java.io.IOException
Analyses a sentence to find the most likely sequence of morphemes

パラメータ:
sentence - The sentence to analyse
戻り値:
The most likely list of morphemes
例外:
java.io.IOException


Copyright ? 2008. All Rights Reserved.