net.java.sen.dictionary
クラス Dictionary

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

public class Dictionary
extends java.lang.Object

The Dictionary class wraps access to a compiled Sen dictionary


コンストラクタの概要
Dictionary(java.lang.String connectionCostFilename, java.lang.String partOfSpeechInfoFilename, java.lang.String tokenFilename, java.lang.String trieFilename)
           
 
メソッドの概要
 CToken[] commonPrefixSearch(CharIterator iterator)
          Searches for possible morphemes starting at the current position of a CharIterator.
 CToken getBOSToken()
          Gets a unique beginning-of-string CToken.
 int getCost(Node lNode2, Node lNode, Node rNode)
          Retrieves the cost between three Nodes from the connection cost matrix
 CToken getEOSToken()
          Gets a unique end-of-string CToken.
 CToken getUnknownToken()
          Gets a unique unknown-morpheme CToken.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

Dictionary

public Dictionary(java.lang.String connectionCostFilename,
                  java.lang.String partOfSpeechInfoFilename,
                  java.lang.String tokenFilename,
                  java.lang.String trieFilename)
           throws java.io.IOException
パラメータ:
connectionCostFilename - Name of the connection cost matrix file
partOfSpeechInfoFilename - Name of the part-of-string information file
tokenFilename - Name of the token file
trieFilename - Name of the trie file
例外:
java.io.IOException
メソッドの詳細

getBOSToken

public CToken getBOSToken()
Gets a unique beginning-of-string CToken. The CToken returned by this method is freshly cloned and not an alias of any other CToken

戻り値:
A beginning-of-string CToken

getEOSToken

public CToken getEOSToken()
Gets a unique end-of-string CToken. The CToken returned by this method is freshly cloned and not an alias of any other CToken

戻り値:
An end-of-string CToken

getUnknownToken

public CToken getUnknownToken()
Gets a unique unknown-morpheme CToken. The CToken returned by this method is freshly cloned and not an alias of any other CToken

戻り値:
A unknown-morpheme CToken

getCost

public int getCost(Node lNode2,
                   Node lNode,
                   Node rNode)
Retrieves the cost between three Nodes from the connection cost matrix

パラメータ:
lNode2 - The first Node
lNode - The second Node
rNode - The third Node
戻り値:
The connection cost

commonPrefixSearch

public CToken[] commonPrefixSearch(CharIterator iterator)
Searches for possible morphemes starting at the current position of a CharIterator. The iterator is advanced by the length of the longest matching morpheme

パラメータ:
iterator - The iterator to search from
戻り値:
The possible morphemes found


Copyright ? 2008. All Rights Reserved.