public final class DirectCandidateGenerator extends CandidateGenerator
| Modifier and Type | Class and Description |
|---|---|
static class |
DirectCandidateGenerator.Candidate |
static class |
DirectCandidateGenerator.CandidateSet |
| Constructor and Description |
|---|
DirectCandidateGenerator(org.apache.lucene.search.spell.DirectSpellChecker spellchecker,
String field,
org.apache.lucene.search.spell.SuggestMode suggestMode,
org.apache.lucene.index.IndexReader reader,
double nonErrorLikelihood,
int numCandidates) |
DirectCandidateGenerator(org.apache.lucene.search.spell.DirectSpellChecker spellchecker,
String field,
org.apache.lucene.search.spell.SuggestMode suggestMode,
org.apache.lucene.index.IndexReader reader,
double nonErrorLikelihood,
int numCandidates,
org.apache.lucene.analysis.Analyzer preFilter,
org.apache.lucene.analysis.Analyzer postFilter,
org.apache.lucene.index.Terms terms) |
| Modifier and Type | Method and Description |
|---|---|
DirectCandidateGenerator.Candidate |
createCandidate(org.apache.lucene.util.BytesRef term,
long frequency,
double channelScore,
boolean userInput) |
DirectCandidateGenerator.CandidateSet |
drawCandidates(DirectCandidateGenerator.CandidateSet set) |
long |
frequency(org.apache.lucene.util.BytesRef term) |
String |
getField() |
long |
internalFrequency(org.apache.lucene.util.BytesRef term) |
boolean |
isKnownWord(org.apache.lucene.util.BytesRef term) |
protected void |
postFilter(DirectCandidateGenerator.Candidate candidate,
org.apache.lucene.util.CharsRefBuilder spare,
org.apache.lucene.util.BytesRefBuilder byteSpare,
List<DirectCandidateGenerator.Candidate> candidates) |
protected org.apache.lucene.util.BytesRef |
preFilter(org.apache.lucene.util.BytesRef term,
org.apache.lucene.util.CharsRefBuilder spare,
org.apache.lucene.util.BytesRefBuilder byteSpare) |
protected long |
thresholdFrequency(long termFrequency,
long dictionarySize) |
createCandidate, createCandidate, drawCandidatespublic DirectCandidateGenerator(org.apache.lucene.search.spell.DirectSpellChecker spellchecker,
String field,
org.apache.lucene.search.spell.SuggestMode suggestMode,
org.apache.lucene.index.IndexReader reader,
double nonErrorLikelihood,
int numCandidates)
throws IOException
IOExceptionpublic DirectCandidateGenerator(org.apache.lucene.search.spell.DirectSpellChecker spellchecker,
String field,
org.apache.lucene.search.spell.SuggestMode suggestMode,
org.apache.lucene.index.IndexReader reader,
double nonErrorLikelihood,
int numCandidates,
org.apache.lucene.analysis.Analyzer preFilter,
org.apache.lucene.analysis.Analyzer postFilter,
org.apache.lucene.index.Terms terms)
throws IOException
IOExceptionpublic boolean isKnownWord(org.apache.lucene.util.BytesRef term)
throws IOException
isKnownWord in class CandidateGeneratorIOExceptionpublic long frequency(org.apache.lucene.util.BytesRef term)
throws IOException
frequency in class CandidateGeneratorIOExceptionpublic long internalFrequency(org.apache.lucene.util.BytesRef term)
throws IOException
IOExceptionpublic String getField()
public DirectCandidateGenerator.CandidateSet drawCandidates(DirectCandidateGenerator.CandidateSet set) throws IOException
drawCandidates in class CandidateGeneratorIOExceptionprotected org.apache.lucene.util.BytesRef preFilter(org.apache.lucene.util.BytesRef term,
org.apache.lucene.util.CharsRefBuilder spare,
org.apache.lucene.util.BytesRefBuilder byteSpare)
throws IOException
IOExceptionprotected void postFilter(DirectCandidateGenerator.Candidate candidate, org.apache.lucene.util.CharsRefBuilder spare, org.apache.lucene.util.BytesRefBuilder byteSpare, List<DirectCandidateGenerator.Candidate> candidates) throws IOException
IOExceptionprotected long thresholdFrequency(long termFrequency,
long dictionarySize)
public DirectCandidateGenerator.Candidate createCandidate(org.apache.lucene.util.BytesRef term, long frequency, double channelScore, boolean userInput) throws IOException
createCandidate in class CandidateGeneratorIOExceptionCopyright © 2009–2017. All rights reserved.