public static class SpellCheckResult.Suggestion extends Object
| Constructor and Description |
|---|
Suggestion(double score,
String suggestion)
Create a new spelling suggestion.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
double |
getScore()
Get the suggestion score.
|
String |
getSuggestion()
Get the suggested term.
|
int |
hashCode() |
String |
toString() |
public Suggestion(double score,
String suggestion)
score - the suggestion scoresuggestion - the suggested termpublic double getScore()
The score is calculated by dividing the number of documents in which the suggested term exists by the total number of documents in the index. Results can be normalized by dividing scores by the highest score.
public String getSuggestion()
Copyright © 2026 lettuce.io. All rights reserved.