public class Token extends Object
Constructor and Description |
---|
Token(int wordId,
char[] surfaceForm,
int offset,
int length,
org.apache.lucene.analysis.ja.JapaneseTokenizer.Type type,
int position,
Dictionary dictionary) |
Modifier and Type | Method and Description |
---|---|
String |
getBaseForm() |
String |
getInflectionForm() |
String |
getInflectionType() |
int |
getLength() |
int |
getOffset() |
String |
getPartOfSpeech() |
int |
getPosition()
Get index of this token in input text
|
int |
getPositionLength()
Get the length (in tokens) of this token.
|
String |
getPronunciation() |
String |
getReading() |
char[] |
getSurfaceForm() |
String |
getSurfaceFormString() |
boolean |
isKnown()
Returns true if this token is known word
|
boolean |
isUnknown()
Returns true if this token is unknown word
|
boolean |
isUser()
Returns true if this token is defined in user dictionary
|
void |
setPositionLength(int positionLength)
Set the position length (in tokens) of this token.
|
String |
toString() |
public Token(int wordId, char[] surfaceForm, int offset, int length, org.apache.lucene.analysis.ja.JapaneseTokenizer.Type type, int position, Dictionary dictionary)
public char[] getSurfaceForm()
public int getOffset()
public int getLength()
public String getSurfaceFormString()
public String getReading()
public String getPronunciation()
public String getPartOfSpeech()
public String getInflectionType()
public String getInflectionForm()
public String getBaseForm()
public boolean isKnown()
public boolean isUnknown()
public boolean isUser()
public int getPosition()
public void setPositionLength(int positionLength)
public int getPositionLength()