Package org.apache.lucene.analysis.ko
Class DictionaryToken
- java.lang.Object
-
- org.apache.lucene.analysis.ko.Token
-
- org.apache.lucene.analysis.ko.DictionaryToken
-
public class DictionaryToken extends Token
A token stored in aDictionary.
-
-
Constructor Summary
Constructors Constructor Description DictionaryToken(KoreanTokenizer.Type type, Dictionary dictionary, int wordId, char[] surfaceForm, int offset, int length, int startOffset, int endOffset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description POS.TaggetLeftPOS()Get the left part of speech of the token.Dictionary.Morpheme[]getMorphemes()Get theDictionary.Morphemedecomposition of the token.POS.TypegetPOSType()Get thePOS.Typeof the token.StringgetReading()Get the reading of the token.POS.TaggetRightPOS()Get the right part of speech of the token.KoreanTokenizer.TypegetType()Returns the type of this tokenbooleanisKnown()Returns true if this token is known wordbooleanisUnknown()Returns true if this token is unknown wordbooleanisUser()Returns true if this token is defined in user dictionaryStringtoString()-
Methods inherited from class org.apache.lucene.analysis.ko.Token
getEndOffset, getLength, getOffset, getPositionIncrement, getPositionLength, getStartOffset, getSurfaceForm, getSurfaceFormString, setPositionIncrement, setPositionLength
-
-
-
-
Constructor Detail
-
DictionaryToken
public DictionaryToken(KoreanTokenizer.Type type, Dictionary dictionary, int wordId, char[] surfaceForm, int offset, int length, int startOffset, int endOffset)
-
-
Method Detail
-
getType
public KoreanTokenizer.Type 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
public POS.Type getPOSType()
Description copied from class:TokenGet thePOS.Typeof the token.- Specified by:
getPOSTypein classToken
-
getLeftPOS
public POS.Tag getLeftPOS()
Description copied from class:TokenGet the left part of speech of the token.- Specified by:
getLeftPOSin classToken
-
getRightPOS
public POS.Tag getRightPOS()
Description copied from class:TokenGet the right part of speech of the token.- Specified by:
getRightPOSin classToken
-
getReading
public String getReading()
Description copied from class:TokenGet the reading of the token.- Specified by:
getReadingin classToken
-
getMorphemes
public Dictionary.Morpheme[] getMorphemes()
Description copied from class:TokenGet theDictionary.Morphemedecomposition of the token.- Specified by:
getMorphemesin classToken
-
-