Class TokenInfoDictionaryEntryWriter

java.lang.Object
org.apache.lucene.analysis.morph.DictionaryEntryWriter
org.apache.lucene.analysis.ko.dict.TokenInfoDictionaryEntryWriter

class TokenInfoDictionaryEntryWriter extends DictionaryEntryWriter
Writes system dictionary entries.
  • Field Details

  • Constructor Details

    • TokenInfoDictionaryEntryWriter

      TokenInfoDictionaryEntryWriter(int size)
  • Method Details

    • putEntry

      protected int putEntry(String[] entry)
      put the entry in map

      mecab-ko-dic features

       0   - surface
       1   - left cost
       2   - right cost
       3   - word cost
       4   - part of speech0+part of speech1+...
       5   - semantic class
       6   - T if the last character of the surface form has a coda, F otherwise
       7   - reading
       8   - POS type (*, Compound, Inflect, Preanalysis)
       9   - left POS
       10  - right POS
       11  - expression
       
      Specified by:
      putEntry in class DictionaryEntryWriter
      Returns:
      current position of buffer, which will be wordId of next entry
    • writeString

      private void writeString(String s)
    • writePosDict

      protected void writePosDict(OutputStream bos, DataOutput out) throws IOException
      Description copied from class: DictionaryEntryWriter
      Flush POS dictionary data.
      Specified by:
      writePosDict in class DictionaryEntryWriter
      Throws:
      IOException