public class Token
extends java.lang.Object
Constructor and Description |
---|
Token(int wordId,
char[] surfaceForm,
int offset,
int length,
JapaneseTokenizer.Type type,
int position,
Dictionary dictionary) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBaseForm() |
java.lang.String |
getInflectionForm() |
java.lang.String |
getInflectionType() |
int |
getLength() |
int |
getOffset() |
java.lang.String |
getPartOfSpeech() |
int |
getPosition()
Get index of this token in input text
|
int |
getPositionLength()
Get the length (in tokens) of this token.
|
java.lang.String |
getPronunciation() |
java.lang.String |
getReading() |
char[] |
getSurfaceForm() |
java.lang.String |
getSurfaceFormString() |
JapaneseTokenizer.Type |
getType()
Returns the type of this token
|
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.
|
java.lang.String |
toString() |
public Token(int wordId, char[] surfaceForm, int offset, int length, JapaneseTokenizer.Type type, int position, Dictionary dictionary)
public java.lang.String toString()
toString
in class java.lang.Object
public char[] getSurfaceForm()
public int getOffset()
public int getLength()
public java.lang.String getSurfaceFormString()
public java.lang.String getReading()
public java.lang.String getPronunciation()
public java.lang.String getPartOfSpeech()
public java.lang.String getInflectionType()
public java.lang.String getInflectionForm()
public java.lang.String getBaseForm()
public JapaneseTokenizer.Type getType()
public boolean isKnown()
public boolean isUnknown()
public boolean isUser()
public int getPosition()
public void setPositionLength(int positionLength)
public int getPositionLength()
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.