public class Dictionary extends Object
Dictionary class wraps access to a compiled Sen dictionary| Constructor and Description |
|---|
Dictionary(ShortBuffer connectionCostBuffer,
ByteBuffer partOfSpeechInfoBuffer,
ByteBuffer tokenBuffer,
IntBuffer trieBuffer,
String[] posIndex,
String[] conjTypeIndex,
String[] conjFormIndex) |
| Modifier and Type | Method and Description |
|---|---|
CToken[] |
commonPrefixSearch(CharIterator iterator)
Searches for possible morphemes starting at the current position of a
CharIterator.
|
CToken |
getBOSToken()
Gets a unique beginning-of-string
. |
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 |
getUnknownToken()
Gets a unique unknown-morpheme
. |
public Dictionary(ShortBuffer connectionCostBuffer, ByteBuffer partOfSpeechInfoBuffer, ByteBuffer tokenBuffer, IntBuffer trieBuffer, String[] posIndex, String[] conjTypeIndex, String[] conjFormIndex)
IOExceptionpublic CToken getBOSToken()
CToken. The CToken returned by this method is
freshly cloned and not an alias of any other CTokenpublic CToken getEOSToken()
CToken. The CToken returned by this method is
freshly cloned and not an alias of any other CTokenpublic CToken getUnknownToken()
CToken. The CToken returned by this method is
freshly cloned and not an alias of any other CTokenpublic int getCost(Node lNode2, Node lNode, Node rNode)
lNode2 - The first NodelNode - The second NoderNode - The third Nodepublic CToken[] commonPrefixSearch(CharIterator iterator)
iterator - The iterator to search from