mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-10-28 05:26:56 +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) -> {
|
result.getCorrections().forEach((SpellResponse.Source source, Set<Suggestion> suggestions) -> {
|
||||||
message
|
message
|
||||||
.append(source.word)
|
.append(source.word)
|
||||||
.append(" : ")
|
.append(": ")
|
||||||
.append(suggestions.stream().map(Suggestion::getWord).collect(Collectors.joining(", ")))
|
.append(suggestions.stream().map(Suggestion::getWord).limit(5).collect(Collectors.joining(",")))
|
||||||
.append("\n");
|
.append("\n");
|
||||||
});
|
});
|
||||||
return message.toString();
|
return message.toString();
|
||||||
|
Loading…
Reference in New Issue
Block a user