|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lucene.analysis.ja.dict.UserDictionary
public final class UserDictionary
Class for building a User Dictionary. This class allows for custom segmentation of phrases.
| Field Summary | |
|---|---|
static int |
LEFT_ID
|
static int |
RIGHT_ID
|
static int |
WORD_COST
|
| Fields inherited from interface org.apache.lucene.analysis.ja.dict.Dictionary |
|---|
INTERNAL_SEPARATOR |
| Constructor Summary | |
|---|---|
UserDictionary(Reader reader)
|
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int WORD_COST
public static final int LEFT_ID
public static final int RIGHT_ID
| Constructor Detail |
|---|
public UserDictionary(Reader reader)
throws IOException
IOException| Method Detail |
|---|
public int[][] lookup(char[] chars,
int off,
int len)
throws IOException
chars - textoff - offset into textlen - length of text
IOExceptionpublic TokenInfoFST getFST()
public int[] lookupSegmentation(int phraseID)
public int getLeftId(int wordId)
Dictionary
getLeftId in interface Dictionarypublic int getRightId(int wordId)
Dictionary
getRightId in interface Dictionarypublic int getWordCost(int wordId)
Dictionary
getWordCost in interface Dictionary
public String getReading(int wordId,
char[] surface,
int off,
int len)
Dictionary
getReading in interface DictionarywordId - word ID of token
public String getPartOfSpeech(int wordId)
Dictionary
getPartOfSpeech in interface DictionarywordId - word ID of token
public String getBaseForm(int wordId,
char[] surface,
int off,
int len)
Dictionary
getBaseForm in interface DictionarywordId - word ID of token
public String getPronunciation(int wordId,
char[] surface,
int off,
int len)
Dictionary
getPronunciation in interface DictionarywordId - word ID of token
public String getInflectionType(int wordId)
Dictionary
getInflectionType in interface DictionarywordId - word ID of token
public String getInflectionForm(int wordId)
Dictionary
getInflectionForm in interface DictionarywordId - word ID of token
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||