java.lang.Object
org.apache.lucene.analysis.morph.Token
org.apache.lucene.analysis.ko.Token
org.apache.lucene.analysis.ko.DictionaryToken
A token stored in a
KoMorphData
.-
Field Summary
FieldsFields inherited from class org.apache.lucene.analysis.morph.Token
endOffset, length, offset, posIncr, posLen, startOffset, surfaceForm, type
-
Constructor Summary
ConstructorsConstructorDescriptionDictionaryToken
(TokenType type, KoMorphData morphAtts, int wordId, char[] surfaceForm, int offset, int length, int startOffset, int endOffset) -
Method Summary
Modifier and TypeMethodDescriptionGet the left part of speech of the token.Get theKoMorphData.Morpheme
decomposition of the token.Get thePOS.Type
of the token.Get the reading of the token.Get the right part of speech of the token.boolean
isKnown()
Returns true if this token is known wordboolean
Returns true if this token is unknown wordboolean
isUser()
Returns true if this token is defined in user dictionarytoString()
Methods inherited from class org.apache.lucene.analysis.morph.Token
getEndOffset, getLength, getOffset, getPositionIncrement, getPositionLength, getStartOffset, getSurfaceForm, getSurfaceFormString, getType, setPositionIncrement, setPositionLength
-
Field Details
-
wordId
private final int wordId -
morphAtts
-
-
Constructor Details
-
DictionaryToken
public DictionaryToken(TokenType type, KoMorphData morphAtts, int wordId, char[] surfaceForm, int offset, int length, int startOffset, int endOffset)
-
-
Method Details
-
toString
-
isKnown
public boolean isKnown()Returns true if this token is known word- Returns:
- true if this token is in standard dictionary. false if not.
-
isUnknown
public boolean isUnknown()Returns true if this token is unknown word- Returns:
- true if this token is unknown word. false if not.
-
isUser
public boolean isUser()Returns true if this token is defined in user dictionary- Returns:
- true if this token is in user dictionary. false if not.
-
getPOSType
Description copied from class:Token
Get thePOS.Type
of the token.- Specified by:
getPOSType
in classToken
-
getLeftPOS
Description copied from class:Token
Get the left part of speech of the token.- Specified by:
getLeftPOS
in classToken
-
getRightPOS
Description copied from class:Token
Get the right part of speech of the token.- Specified by:
getRightPOS
in classToken
-
getReading
Description copied from class:Token
Get the reading of the token.- Specified by:
getReading
in classToken
-
getMorphemes
Description copied from class:Token
Get theKoMorphData.Morpheme
decomposition of the token.- Specified by:
getMorphemes
in classToken
-