Package org.apache.lucene.analysis.ko
Class DictionaryToken
java.lang.Object
org.apache.lucene.analysis.ko.Token
org.apache.lucene.analysis.ko.DictionaryToken
A token stored in a
Dictionary.-
Constructor Summary
ConstructorsConstructorDescriptionDictionaryToken(KoreanTokenizer.Type type, Dictionary dictionary, 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 theDictionary.Morphemedecomposition of the token.Get thePOS.Typeof the token.Get the reading of the token.Get the right part of speech of the token.getType()Returns the type of this tokenbooleanisKnown()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.ko.Token
getEndOffset, getLength, getOffset, getPositionIncrement, getPositionLength, getStartOffset, getSurfaceForm, getSurfaceFormString, setPositionIncrement, setPositionLength
-
Constructor Details
-
DictionaryToken
public DictionaryToken(KoreanTokenizer.Type type, Dictionary dictionary, int wordId, char[] surfaceForm, int offset, int length, int startOffset, int endOffset)
-
-
Method Details
-
toString
-
getType
Returns the type of this token- Returns:
- token type, not null
-
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 theDictionary.Morphemedecomposition of the token.- Specified by:
getMorphemesin classToken
-