Class NGramDictionaryGenerator


  • public class NGramDictionaryGenerator
    extends java.lang.Object
    Use this generator to train an ngram model.
    It will load texts from a TrainingCorpus and generate a ngram file that could be later opened with a StaticNGramTrieDictionary
    • Method Detail

      • executeNGramTraining

        public java.util.Map<java.lang.Integer,​Pair<java.lang.Integer,​java.lang.Integer>> executeNGramTraining​(TrainingCorpus corpus,
                                                                                                                           java.io.File ngramOutputFile,
                                                                                                                           java.util.function.Consumer<java.util.List<TrainerTask>> blockingTaskExecutor)
                                                                                                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • getNgramDebugBeforePruning

        public NGramDebugger getNgramDebugBeforePruning()
      • setNgramDebugBeforePruning

        public void setNgramDebugBeforePruning​(NGramDebugger ngramDebugBeforePruning)
      • getNgramDebugAfterPruning

        public NGramDebugger getNgramDebugAfterPruning()
      • setNgramDebugAfterPruning

        public void setNgramDebugAfterPruning​(NGramDebugger ngramDebugAfterPruning)
      • getDebugPrefix

        public java.lang.String getDebugPrefix()
      • setDebugPrefix

        public void setDebugPrefix​(java.lang.String debugPrefix)