Package org.apache.lucene.analysis.ko
Class DictionaryToken
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
Fields 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.Morphemedecomposition of the token.Get thePOS.Typeof the token.Get the reading of the token.Get the right part of speech of the token.booleanisKnown()Returns true if this token is known wordbooleanReturns true if this token is unknown wordbooleanisUser()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
-
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:TokenGet thePOS.Typeof the token.- Specified by:
getPOSTypein classToken
-
getLeftPOS
Description copied from class:TokenGet the left part of speech of the token.- Specified by:
getLeftPOSin classToken
-
getRightPOS
Description copied from class:TokenGet the right part of speech of the token.- Specified by:
getRightPOSin classToken
-
getReading
Description copied from class:TokenGet the reading of the token.- Specified by:
getReadingin classToken
-
getMorphemes
Description copied from class:TokenGet theKoMorphData.Morphemedecomposition of the token.- Specified by:
getMorphemesin classToken
-