Package org.apache.lucene.analysis.ko
Class Token
- java.lang.Object
-
- org.apache.lucene.analysis.ko.Token
-
- Direct Known Subclasses:
DecompoundToken,DictionaryToken
public abstract class Token extends Object
Analyzed token with morphological data.
-
-
Constructor Summary
Constructors Constructor Description Token(char[] surfaceForm, int offset, int length, int startOffset, int endOffset)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intgetEndOffset()Get the end offset of the term in the analyzed text.abstract POS.TaggetLeftPOS()Get the left part of speech of the token.intgetLength()abstract Dictionary.Morpheme[]getMorphemes()Get theDictionary.Morphemedecomposition of the token.intgetOffset()intgetPositionIncrement()intgetPositionLength()abstract POS.TypegetPOSType()Get thePOS.Typeof the token.abstract StringgetReading()Get the reading of the token.abstract POS.TaggetRightPOS()Get the right part of speech of the token.intgetStartOffset()Get the start offset of the term in the analyzed text.char[]getSurfaceForm()StringgetSurfaceFormString()voidsetPositionIncrement(int posIncr)voidsetPositionLength(int posLen)
-
-
-
Method Detail
-
getSurfaceForm
public char[] getSurfaceForm()
- Returns:
- surfaceForm
-
getOffset
public int getOffset()
- Returns:
- offset into surfaceForm
-
getLength
public int getLength()
- Returns:
- length of surfaceForm
-
getSurfaceFormString
public String getSurfaceFormString()
- Returns:
- surfaceForm as a String
-
getLeftPOS
public abstract POS.Tag getLeftPOS()
Get the left part of speech of the token.
-
getRightPOS
public abstract POS.Tag getRightPOS()
Get the right part of speech of the token.
-
getReading
public abstract String getReading()
Get the reading of the token.
-
getMorphemes
public abstract Dictionary.Morpheme[] getMorphemes()
Get theDictionary.Morphemedecomposition 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()
-
-