Class TokenInfoDictionary

java.lang.Object
org.apache.lucene.analysis.morph.BinaryDictionary<org.apache.lucene.analysis.ja.dict.TokenInfoMorphData>
org.apache.lucene.analysis.ja.dict.TokenInfoDictionary
All Implemented Interfaces:
Dictionary<org.apache.lucene.analysis.ja.dict.TokenInfoMorphData>

public final class TokenInfoDictionary extends BinaryDictionary<org.apache.lucene.analysis.ja.dict.TokenInfoMorphData>
Binary dictionary implementation for a known-word dictionary model: Words are encoded into an FST mapping to a list of wordIDs.
  • Field Details

  • Constructor Details

    • TokenInfoDictionary

      public TokenInfoDictionary(Path targetMapFile, Path posDictFile, Path dictFile, Path fstFile) throws IOException
      Create a TokenInfoDictionary from an external resource path.
      Parameters:
      targetMapFile - where to load target map resource
      posDictFile - where to load POS dictionary resource
      dictFile - where to load dictionary entries resource
      fstFile - where to load encoded FST data resource
      Throws:
      IOException - if resource was not found or broken
    • TokenInfoDictionary

      public TokenInfoDictionary(URL targetMapUrl, URL posDictUrl, URL dictUrl, URL fstUrl) throws IOException
      Create a TokenInfoDictionary from an external resource URL (e.g. from Classpath with ClassLoader.getResource(String)).
      Parameters:
      targetMapUrl - where to load target map resource
      posDictUrl - where to load POS dictionary resource
      dictUrl - where to load dictionary entries resource
      fstUrl - where to load encoded FST data resource
      Throws:
      IOException - if resource was not found or broken
  • Method Details

    • getMorphAttributes

      public org.apache.lucene.analysis.ja.dict.TokenInfoMorphData getMorphAttributes()
    • getFST

      public TokenInfoFST getFST()
    • getInstance

      public static TokenInfoDictionary getInstance()