Class DictionaryBuilder


  • public class DictionaryBuilder
    extends java.lang.Object
    Tool to build dictionaries. Usage:
        java -cp [lucene classpath] org.apache.lucene.analysis.ja.util.DictionaryBuilder \
              ${inputDir} ${outputDir} ${encoding}
     

    The input directory is expected to include unk.def, matrix.def, plus any number of .csv files, roughly following the conventions of IPADIC. JapaneseTokenizer uses dictionaries built with this tool. Note that the input files required by this build generally must be generated from a corpus of real text using tools that are not part of Lucene.

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private DictionaryBuilder()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void build​(DictionaryBuilder.DictionaryFormat format, java.nio.file.Path inputDir, java.nio.file.Path outputDir, java.lang.String encoding, boolean normalizeEntry)  
      static void main​(java.lang.String[] args)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DictionaryBuilder

        private DictionaryBuilder()
    • Method Detail

      • build

        public static void build​(DictionaryBuilder.DictionaryFormat format,
                                 java.nio.file.Path inputDir,
                                 java.nio.file.Path outputDir,
                                 java.lang.String encoding,
                                 boolean normalizeEntry)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • main

        public static void main​(java.lang.String[] args)
                         throws java.io.IOException
        Throws:
        java.io.IOException