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

Package org.apache.lucene.analysis.ko

# Class DecompoundToken

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

public class DecompoundToken extends Token
A token that was generated from a compound.

- ## Field Summary

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

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DecompoundToken(POS.Tag posTag, String surfaceForm, int startOffset, int endOffset, TokenType type)`
  Creates a new DecompoundToken

- ## Method Summary

  Modifier and Type
  Method
  Description
  `POS.Tag`
  `getLeftPOS()`
  Get the left part of speech of the token.
  `KoMorphData.Morpheme[]`
  `getMorphemes()`
  Get the `KoMorphData.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.
  `String`
  `toString()`

  ### 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, wait, wait, wait`

- ## Constructor Details

  - ### DecompoundToken

    public DecompoundToken(POS.Tag posTag, String surfaceForm, int startOffset, int endOffset, TokenType type)
    Creates a new DecompoundToken
    Parameters:
      `posTag` - The part of speech of the token.
      `surfaceForm` - The surface form of the token.
      `startOffset` - The start offset of the token in the analyzed text.
      `endOffset` - The end offset of the token in the analyzed text.
      `type` - The type of this token.

- ## Method Details

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### 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 KoMorphData.Morpheme[] getMorphemes()
    Description copied from class: `Token`
    Get the `KoMorphData.Morpheme` decomposition of the token.
    Specified by:
      `getMorphemes` in class `Token`