Package | Description |
---|---|
org.apache.lucene.search.spell |
Suggest alternate spellings for words.
|
Modifier and Type | Field and Description |
---|---|
SuggestWord |
CombineSuggestion.suggestion
The word combination suggestion
|
(package private) SuggestWord[] |
WordBreakSpellChecker.SuggestWordArrayWrapper.suggestWords |
Modifier and Type | Field and Description |
---|---|
private java.util.Comparator<SuggestWord> |
DirectSpellChecker.comparator
the comparator to use
|
private java.util.Comparator<SuggestWord> |
SuggestWordQueue.comparator |
private java.util.Comparator<SuggestWord> |
SpellChecker.comparator |
static java.util.Comparator<SuggestWord> |
SuggestWordQueue.DEFAULT_COMPARATOR
Default comparator: score then frequency.
|
Modifier and Type | Method and Description |
---|---|
private SuggestWord |
WordBreakSpellChecker.generateSuggestWord(IndexReader ir,
java.lang.String fieldname,
java.lang.String text) |
private SuggestWord[] |
WordBreakSpellChecker.newPrefix(SuggestWord[] oldPrefix,
SuggestWord append) |
private SuggestWord[] |
WordBreakSpellChecker.newSuggestion(SuggestWord[] prefix,
SuggestWord append1,
SuggestWord append2) |
SuggestWord[] |
DirectSpellChecker.suggestSimilar(Term term,
int numSug,
IndexReader ir)
|
SuggestWord[] |
DirectSpellChecker.suggestSimilar(Term term,
int numSug,
IndexReader ir,
SuggestMode suggestMode)
|
SuggestWord[] |
DirectSpellChecker.suggestSimilar(Term term,
int numSug,
IndexReader ir,
SuggestMode suggestMode,
float accuracy)
Suggest similar words.
|
SuggestWord[][] |
WordBreakSpellChecker.suggestWordBreaks(Term term,
int maxSuggestions,
IndexReader ir,
SuggestMode suggestMode,
WordBreakSpellChecker.BreakSuggestionSortMethod sortMethod)
Generate suggestions by breaking the passed-in term into multiple words.
|
Modifier and Type | Method and Description |
---|---|
java.util.Comparator<SuggestWord> |
DirectSpellChecker.getComparator()
Get the current comparator in use.
|
java.util.Comparator<SuggestWord> |
SpellChecker.getComparator()
Gets the comparator in use for ranking suggestions.
|
Modifier and Type | Method and Description |
---|---|
int |
SuggestWordFrequencyComparator.compare(SuggestWord first,
SuggestWord second) |
int |
SuggestWordScoreComparator.compare(SuggestWord first,
SuggestWord second) |
private int |
WordBreakSpellChecker.generateBreakUpSuggestions(Term term,
IndexReader ir,
int numberBreaks,
int maxSuggestions,
int useMinSuggestionFrequency,
SuggestWord[] prefix,
java.util.Queue<WordBreakSpellChecker.SuggestWordArrayWrapper> suggestions,
int totalEvaluations,
WordBreakSpellChecker.BreakSuggestionSortMethod sortMethod) |
protected boolean |
SuggestWordQueue.lessThan(SuggestWord wa,
SuggestWord wb) |
private SuggestWord[] |
WordBreakSpellChecker.newPrefix(SuggestWord[] oldPrefix,
SuggestWord append) |
private SuggestWord[] |
WordBreakSpellChecker.newPrefix(SuggestWord[] oldPrefix,
SuggestWord append) |
private SuggestWord[] |
WordBreakSpellChecker.newSuggestion(SuggestWord[] prefix,
SuggestWord append1,
SuggestWord append2) |
private SuggestWord[] |
WordBreakSpellChecker.newSuggestion(SuggestWord[] prefix,
SuggestWord append1,
SuggestWord append2) |
Modifier and Type | Method and Description |
---|---|
void |
DirectSpellChecker.setComparator(java.util.Comparator<SuggestWord> comparator)
Set the comparator for sorting suggestions.
|
void |
SpellChecker.setComparator(java.util.Comparator<SuggestWord> comparator)
Sets the
Comparator for the SuggestWordQueue . |
Constructor and Description |
---|
CombineSuggestion(SuggestWord suggestion,
int[] originalTermIndexes)
Creates a new CombineSuggestion from a
suggestion and
an array of term ids (referencing the indexes to the original terms that
form this combined suggestion) |
SuggestWordArrayWrapper(SuggestWord[] suggestWords) |
Constructor and Description |
---|
SpellChecker(Directory spellIndex,
StringDistance sd,
java.util.Comparator<SuggestWord> comparator)
Use the given directory as a spell checker index with the given
StringDistance measure
and the given Comparator for sorting the results. |
SuggestWordQueue(int size,
java.util.Comparator<SuggestWord> comparator)
Specify the size of the queue and the comparator to use for sorting.
|