org.apache.lucene.analysis.ko

## Class Token

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

- Direct Known Subclasses:
    DecompoundToken, DictionaryToken

      public abstract class Token
      extends Object

  Analyzed token with morphological data.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Token(char[] surfaceForm, int offset, int length, int startOffset, int endOffset)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getEndOffset()` Get the end offset of the term in the analyzed text.
    `abstract POS.Tag` | `getLeftPOS()` Get the left part of speech of the token.
    `int` | `getLength()`
    `abstract Dictionary.Morpheme[]` | `getMorphemes()` Get the `Dictionary.Morpheme` decomposition of the token.
    `int` | `getOffset()`
    `int` | `getPositionIncrement()`
    `int` | `getPositionLength()`
    `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.
    `int` | `getStartOffset()` Get the start offset of the term in the analyzed text.
    `char[]` | `getSurfaceForm()`
    `String` | `getSurfaceFormString()`
    `void` | `setPositionIncrement(int posIncr)`
    `void` | `setPositionLength(int posLen)`

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

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

- - ### Constructor Detail

    - #### Token

          public Token(char[] surfaceForm,
                       int offset,
                       int length,
                       int startOffset,
                       int endOffset)

  - ### Method Detail

    - #### getSurfaceForm

          public char[] getSurfaceForm()

      Returns:
        surfaceForm

    - #### getOffset

          public int getOffset()

      Returns:
        offset into surfaceForm

    - #### getLength

          public int getLength()

      Returns:
        length of surfaceForm

    - #### getSurfaceFormString

          public String getSurfaceFormString()

      Returns:
        surfaceForm as a String

    - #### 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 Dictionary.Morpheme[] getMorphemes()

      Get the `Dictionary.Morpheme` decomposition of the token.

    - #### getStartOffset

          public int getStartOffset()

      Get the start offset of the term in the analyzed text.

    - #### getEndOffset

          public int getEndOffset()

      Get the end offset of the term in the analyzed text.

    - #### setPositionIncrement

          public void setPositionIncrement(int posIncr)

    - #### getPositionIncrement

          public int getPositionIncrement()

    - #### setPositionLength

          public void setPositionLength(int posLen)

    - #### getPositionLength

          public int getPositionLength()

Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.