Token (Lucene 10.5.0 nori API)
Description: declaration: package: org.apache.lucene.analysis.ko, class: Token

Package org.apache.lucene.analysis.ko

# Class Token

java.lang.Object
org.apache.lucene.analysis.morph.Token
org.apache.lucene.analysis.ko.Token

Direct Known Subclasses:
  `DecompoundToken`, `DictionaryToken`

public abstract class Token extends Token
Analyzed token with morphological data.

- ## Field Summary

  ### Fields inherited from class org.apache.lucene.analysis.morph.Token

  `endOffset, length, offset, posIncr, posLen, startOffset, surfaceForm, type`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `Token(char[] surfaceForm, int offset, int length, int startOffset, int endOffset, TokenType type)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract POS.Tag`
  `getLeftPOS()`
  Get the left part of speech of the token.
  `abstract KoMorphData.Morpheme[]`
  `getMorphemes()`
  Get the `KoMorphData.Morpheme` decomposition of the token.
  `abstract POS.Type`
  `getPOSType()`
  Get the `POS.Type` of the token.
  `abstract String`
  `getReading()`
  Get the reading of the token.
  `abstract POS.Tag`
  `getRightPOS()`
  Get the right part of speech of the token.

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

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

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

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

- ## Constructor Details

  - ### Token

    protected Token(char[] surfaceForm, int offset, int length, int startOffset, int endOffset, TokenType type)

- ## Method Details

  - ### getPOSType

    public abstract POS.Type getPOSType()
    Get the `POS.Type` of the token.

  - ### getLeftPOS

    public abstract POS.Tag getLeftPOS()
    Get the left part of speech of the token.

  - ### getRightPOS

    public abstract POS.Tag getRightPOS()
    Get the right part of speech of the token.

  - ### getReading

    public abstract String getReading()
    Get the reading of the token.

  - ### getMorphemes

    public abstract KoMorphData.Morpheme[] getMorphemes()
    Get the `KoMorphData.Morpheme` decomposition of the token.