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 Details

    • Token

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

    • 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()