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 a `Dictionary`.

### Constructor Summary

Constructors
Constructor and 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
`POS.Tag` `getLeftPOS()` Get the left part of speech of the token.
`Dictionary.Morpheme[]` `getMorphemes()` Get the `Dictionary.Morpheme` decomposition of the token.
`POS.Type` `getPOSType()` Get the `POS.Type` of the token.
`String` `getReading()` Get the reading of the token.
`POS.Tag` `getRightPOS()` Get the right part of speech of the token.
`KoreanTokenizer.Type` `getType()` Returns the type of this token
`boolean` `isKnown()` Returns true if this token is known word
`boolean` `isUnknown()` Returns true if this token is unknown word
`boolean` `isUser()` Returns true if this token is defined in user dictionary
`String` `toString()`

### Methods inherited from class org.apache.lucene.analysis.ko.Token

`getEndOffset, getLength, getOffset, getPositionIncrement, getPositionLength, getStartOffset, getSurfaceForm, getSurfaceFormString, setPositionIncrement, setPositionLength`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### DictionaryToken

    public DictionaryToken(KoreanTokenizer.Type type,
                           Dictionary dictionary,
                           int wordId,
                           char[] surfaceForm,
                           int offset,
                           int length,
                           int startOffset,
                           int endOffset)

### Method Detail

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### 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: `Token`
Get the `POS.Type` of the token.

Specified by:
  `getPOSType` in class `Token`

#### getLeftPOS

    public POS.Tag getLeftPOS()

Description copied from class: `Token`
Get the left part of speech of the token.

Specified by:
  `getLeftPOS` in class `Token`

#### getRightPOS

    public POS.Tag getRightPOS()

Description copied from class: `Token`
Get the right part of speech of the token.

Specified by:
  `getRightPOS` in class `Token`

#### getReading

    public String getReading()

Description copied from class: `Token`
Get the reading of the token.

Specified by:
  `getReading` in class `Token`

#### getMorphemes

    public Dictionary.Morpheme[] getMorphemes()

Description copied from class: `Token`
Get the `Dictionary.Morpheme` decomposition of the token.

Specified by:
  `getMorphemes` in class `Token`