public final class UserDictionary extends Object implements Dictionary
| Modifier and Type | Field and Description |
|---|---|
static int |
LEFT_ID |
static int |
RIGHT_ID |
static int |
WORD_COST |
INTERNAL_SEPARATOR| Modifier and Type | Method and Description |
|---|---|
String |
getBaseForm(int wordId,
char[] surface,
int off,
int len)
Get base form of word
|
TokenInfoFST |
getFST() |
String |
getInflectionForm(int wordId)
Get inflection form of tokens
|
String |
getInflectionType(int wordId)
Get inflection type of tokens
|
int |
getLeftId(int wordId)
Get left id of specified word
|
String |
getPartOfSpeech(int wordId)
Get Part-Of-Speech of tokens
|
String |
getPronunciation(int wordId,
char[] surface,
int off,
int len)
Get pronunciation of tokens
|
String |
getReading(int wordId,
char[] surface,
int off,
int len)
Get reading of tokens
|
int |
getRightId(int wordId)
Get right id of specified word
|
int |
getWordCost(int wordId)
Get word cost of specified word
|
int[][] |
lookup(char[] chars,
int off,
int len)
Lookup words in text
|
int[] |
lookupSegmentation(int phraseID) |
static UserDictionary |
open(Reader reader) |
public static final int WORD_COST
public static final int LEFT_ID
public static final int RIGHT_ID
public static UserDictionary open(Reader reader) throws IOException
IOExceptionpublic int[][] lookup(char[] chars,
int off,
int len)
throws IOException
chars - textoff - offset into textlen - length of textIOExceptionpublic TokenInfoFST getFST()
public int[] lookupSegmentation(int phraseID)
public int getLeftId(int wordId)
DictionarygetLeftId in interface Dictionarypublic int getRightId(int wordId)
DictionarygetRightId in interface Dictionarypublic int getWordCost(int wordId)
DictionarygetWordCost in interface Dictionarypublic String getReading(int wordId, char[] surface, int off, int len)
DictionarygetReading in interface DictionarywordId - word ID of tokenpublic String getPartOfSpeech(int wordId)
DictionarygetPartOfSpeech in interface DictionarywordId - word ID of tokenpublic String getBaseForm(int wordId, char[] surface, int off, int len)
DictionarygetBaseForm in interface DictionarywordId - word ID of tokenpublic String getPronunciation(int wordId, char[] surface, int off, int len)
DictionarygetPronunciation in interface DictionarywordId - word ID of tokenpublic String getInflectionType(int wordId)
DictionarygetInflectionType in interface DictionarywordId - word ID of tokenpublic String getInflectionForm(int wordId)
DictionarygetInflectionForm in interface DictionarywordId - word ID of tokenCopyright © 2000-2015 Apache Software Foundation. All Rights Reserved.