1
0
Fork 0

fixed incorrect suggestion order in Chinese and Japanese sometimes

This commit is contained in:
sspanak 2025-04-09 13:52:54 +03:00 committed by Dimo Karaivanov
parent 82cac3153e
commit 7ac10e6363

View file

@ -24,6 +24,12 @@ public class IdeogramPredictions extends WordPredictions {
super(settings, textField); super(settings, textField);
minWords = 1; minWords = 1;
onlyExactMatches = true; onlyExactMatches = true;
// Prevent incorrect ordering of words that have the same sequence, but different character lengths.
// In East Asian languages, we almost always want exact matches, so anything that appears longer, is
// usually only spelled longer, not that it contains more sounds.
// For example, "KONO" = "この" and "". "" must not come before "この", because it is shorter.
orderWordsByLength = false;
} }