Class NoisyChannelSpellChecker


  • public final class NoisyChannelSpellChecker
    extends java.lang.Object
    • Constructor Detail

      • NoisyChannelSpellChecker

        public NoisyChannelSpellChecker()
      • NoisyChannelSpellChecker

        public NoisyChannelSpellChecker​(double nonErrorLikelihood)
      • NoisyChannelSpellChecker

        public NoisyChannelSpellChecker​(double nonErrorLikelihood,
                                        boolean requireUnigram,
                                        int tokenLimit)
    • Method Detail

      • getCorrections

        public NoisyChannelSpellChecker.Result getCorrections​(org.apache.lucene.analysis.TokenStream stream,
                                                              CandidateGenerator generator,
                                                              float maxErrors,
                                                              int numCorrections,
                                                              WordScorer wordScorer,
                                                              float confidence,
                                                              int gramSize)
                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • getCorrections

        public NoisyChannelSpellChecker.Result getCorrections​(org.apache.lucene.analysis.Analyzer analyzer,
                                                              org.apache.lucene.util.BytesRef query,
                                                              CandidateGenerator generator,
                                                              float maxErrors,
                                                              int numCorrections,
                                                              org.apache.lucene.index.IndexReader reader,
                                                              java.lang.String analysisField,
                                                              WordScorer scorer,
                                                              float confidence,
                                                              int gramSize)
                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • tokenStream

        public org.apache.lucene.analysis.TokenStream tokenStream​(org.apache.lucene.analysis.Analyzer analyzer,
                                                                  org.apache.lucene.util.BytesRef query,
                                                                  org.apache.lucene.util.CharsRefBuilder spare,
                                                                  java.lang.String field)
                                                           throws java.io.IOException
        Throws:
        java.io.IOException