Class UserDictionary

java.lang.Object
org.apache.lucene.analysis.ja.dict.UserDictionary
All Implemented Interfaces:
Dictionary<org.apache.lucene.analysis.ja.dict.UserMorphData>

public final class UserDictionary extends Object implements Dictionary<org.apache.lucene.analysis.ja.dict.UserMorphData>
Class for building a User Dictionary. This class allows for custom segmentation of phrases.
  • Field Details

  • Method Details

    • open

      public static UserDictionary open(Reader reader) throws IOException
      Throws:
      IOException
    • getMorphAttributes

      public org.apache.lucene.analysis.ja.dict.UserMorphData getMorphAttributes()
      Specified by:
      getMorphAttributes in interface Dictionary<org.apache.lucene.analysis.ja.dict.UserMorphData>
    • lookup

      public int[][] lookup(char[] chars, int off, int len) throws IOException
      Lookup words in text
      Parameters:
      chars - text
      off - offset into text
      len - length of text
      Returns:
      array of {wordId, position, length}
      Throws:
      IOException
    • getFST

      public TokenInfoFST getFST()
    • lookupSegmentation

      public int[] lookupSegmentation(int phraseID)