Class NoisyChannelSpellChecker
- java.lang.Object
-
- org.elasticsearch.search.suggest.phrase.NoisyChannelSpellChecker
-
public final class NoisyChannelSpellChecker extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NoisyChannelSpellChecker.Result
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_TOKEN_LIMIT
static double
REAL_WORD_LIKELYHOOD
-
Constructor Summary
Constructors Constructor Description NoisyChannelSpellChecker()
NoisyChannelSpellChecker(double nonErrorLikelihood)
NoisyChannelSpellChecker(double nonErrorLikelihood, boolean requireUnigram, int tokenLimit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)
NoisyChannelSpellChecker.Result
getCorrections(org.apache.lucene.analysis.TokenStream stream, CandidateGenerator generator, float maxErrors, int numCorrections, WordScorer wordScorer, float confidence, int gramSize)
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)
-
-
-
Field Detail
-
REAL_WORD_LIKELYHOOD
public static final double REAL_WORD_LIKELYHOOD
- See Also:
- Constant Field Values
-
DEFAULT_TOKEN_LIMIT
public static final int DEFAULT_TOKEN_LIMIT
- See Also:
- Constant Field Values
-
-
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
-
-