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, drawCandidates
public 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
IOException
public 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
IOException
public boolean isKnownWord(org.apache.lucene.util.BytesRef term) throws IOException
isKnownWord
in class CandidateGenerator
IOException
public long frequency(org.apache.lucene.util.BytesRef term) throws IOException
frequency
in class CandidateGenerator
IOException
public long internalFrequency(org.apache.lucene.util.BytesRef term) throws IOException
IOException
public String getField()
public DirectCandidateGenerator.CandidateSet drawCandidates(DirectCandidateGenerator.CandidateSet set) throws IOException
drawCandidates
in class CandidateGenerator
IOException
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) throws IOException
IOException
protected void postFilter(DirectCandidateGenerator.Candidate candidate, org.apache.lucene.util.CharsRefBuilder spare, org.apache.lucene.util.BytesRefBuilder byteSpare, List<DirectCandidateGenerator.Candidate> candidates) throws IOException
IOException
protected 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 CandidateGenerator
IOException
Copyright © 2009–2016. All rights reserved.