mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-11-19 14:33:02 +00:00
Limiting spelling suggesions to the five cloest matches
This commit is contained in:
parent
38e8a0dcc7
commit
287ceca85f
@ -246,8 +246,8 @@ public class MythosEditor {
|
||||
result.getCorrections().forEach((SpellResponse.Source source, Set<Suggestion> suggestions) -> {
|
||||
message
|
||||
.append(source.word)
|
||||
.append(" : ")
|
||||
.append(suggestions.stream().map(Suggestion::getWord).collect(Collectors.joining(", ")))
|
||||
.append(": ")
|
||||
.append(suggestions.stream().map(Suggestion::getWord).limit(5).collect(Collectors.joining(",")))
|
||||
.append("\n");
|
||||
});
|
||||
return message.toString();
|
||||
|
Loading…
Reference in New Issue
Block a user