java.lang.Object
org.apache.lucene.analysis.ja.dict.UserMorphData
All Implemented Interfaces:
JaMorphData, MorphData

final class UserMorphData extends Object implements JaMorphData
Morphological information for user dictionary.
  • Field Details

  • Constructor Details

    • UserMorphData

      UserMorphData(String[] data)
  • Method Details

    • getLeftId

      public int getLeftId(int wordId)
      Description copied from interface: MorphData
      Get left id of specified word
      Specified by:
      getLeftId in interface MorphData
      Returns:
      left id
    • getRightId

      public int getRightId(int wordId)
      Description copied from interface: MorphData
      Get right id of specified word
      Specified by:
      getRightId in interface MorphData
      Returns:
      right id
    • getWordCost

      public int getWordCost(int wordId)
      Description copied from interface: MorphData
      Get word cost of specified word
      Specified by:
      getWordCost in interface MorphData
      Returns:
      word's cost
    • getReading

      public String getReading(int morphId, char[] surface, int off, int len)
      Description copied from interface: JaMorphData
      Get reading of tokens
      Specified by:
      getReading in interface JaMorphData
      Parameters:
      morphId - word ID of token
      Returns:
      Reading of the token
    • getPartOfSpeech

      public String getPartOfSpeech(int morphId)
      Description copied from interface: JaMorphData
      Get Part-Of-Speech of tokens
      Specified by:
      getPartOfSpeech in interface JaMorphData
      Parameters:
      morphId - word ID of token
      Returns:
      Part-Of-Speech of the token
    • getBaseForm

      public String getBaseForm(int morphId, char[] surface, int off, int len)
      Description copied from interface: JaMorphData
      Get base form of word
      Specified by:
      getBaseForm in interface JaMorphData
      Parameters:
      morphId - word ID of token
      Returns:
      Base form (only different for inflected words, otherwise null)
    • getPronunciation

      public String getPronunciation(int morphId, char[] surface, int off, int len)
      Description copied from interface: JaMorphData
      Get pronunciation of tokens
      Specified by:
      getPronunciation in interface JaMorphData
      Parameters:
      morphId - word ID of token
      Returns:
      Pronunciation of the token
    • getInflectionType

      public String getInflectionType(int morphId)
      Description copied from interface: JaMorphData
      Get inflection type of tokens
      Specified by:
      getInflectionType in interface JaMorphData
      Parameters:
      morphId - word ID of token
      Returns:
      inflection type, or null
    • getInflectionForm

      public String getInflectionForm(int wordId)
      Description copied from interface: JaMorphData
      Get inflection form of tokens
      Specified by:
      getInflectionForm in interface JaMorphData
      Parameters:
      wordId - word ID of token
      Returns:
      inflection form, or null
    • getAllFeaturesArray

      private String[] getAllFeaturesArray(int wordId)
    • getFeature

      private String getFeature(int wordId, int... fields)