mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-18 16:03:12 +00:00
fix too aggressive correction for words with same base latin characters
This commit is contained in:
parent
e3240965a8
commit
305fcdf221
2 changed files with 18 additions and 0 deletions
|
@ -416,6 +416,11 @@ public final class Suggest {
|
|||
// dict locale different -> return the better match
|
||||
return new boolean[]{ true, dictLocale == first.mSourceDict.mLocale };
|
||||
}
|
||||
if (first.mScore < typedWordFirstOccurrenceWordInfo.mScore - 100000) {
|
||||
// don't autocorrect if typed word is clearly the better suggestion
|
||||
// todo: maybe this should be reduced more, to 50k or even 0
|
||||
return new boolean[]{ true, false };
|
||||
}
|
||||
putEmptyWordSuggestions.run();
|
||||
int firstScoreForEmpty = firstAndTypedWordEmptyInfos.get(0) != null ? firstAndTypedWordEmptyInfos.get(0).mScore : 0;
|
||||
int typedScoreForEmpty = firstAndTypedWordEmptyInfos.get(1) != null ? firstAndTypedWordEmptyInfos.get(1).mScore : 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue