Package org.apache.lucene.analysis.ko
Class Token
java.lang.Object
org.apache.lucene.analysis.ko.Token
- Direct Known Subclasses:
DecompoundToken
,DictionaryToken
Analyzed token with morphological data.
-
Constructor Summary
ConstructorDescriptionToken
(char[] surfaceForm, int offset, int length, int startOffset, int endOffset) -
Method Summary
Modifier and TypeMethodDescriptionint
Get the end offset of the term in the analyzed text.abstract POS.Tag
Get the left part of speech of the token.int
abstract Dictionary.Morpheme[]
Get theDictionary.Morpheme
decomposition of the token.int
int
int
abstract POS.Type
Get thePOS.Type
of the token.abstract String
Get the reading of the token.abstract POS.Tag
Get the right part of speech of the token.int
Get the start offset of the term in the analyzed text.char[]
void
setPositionIncrement
(int posIncr) void
setPositionLength
(int posLen)
-
Constructor Details
-
Token
public Token(char[] surfaceForm, int offset, int length, int startOffset, int endOffset)
-
-
Method Details
-
getSurfaceForm
public char[] getSurfaceForm()- Returns:
- surfaceForm
-
getOffset
public int getOffset()- Returns:
- offset into surfaceForm
-
getLength
public int getLength()- Returns:
- length of surfaceForm
-
getSurfaceFormString
- Returns:
- surfaceForm as a String
-
getPOSType
Get thePOS.Type
of the token. -
getLeftPOS
Get the left part of speech of the token. -
getRightPOS
Get the right part of speech of the token. -
getReading
Get the reading of the token. -
getMorphemes
Get theDictionary.Morpheme
decomposition of the token. -
getStartOffset
public int getStartOffset()Get the start offset of the term in the analyzed text. -
getEndOffset
public int getEndOffset()Get the end offset of the term in the analyzed text. -
setPositionIncrement
public void setPositionIncrement(int posIncr) -
getPositionIncrement
public int getPositionIncrement() -
setPositionLength
public void setPositionLength(int posLen) -
getPositionLength
public int getPositionLength()
-