From 7ac10e63630d25abdbceac3e51c7802aba905fdc Mon Sep 17 00:00:00 2001 From: sspanak Date: Wed, 9 Apr 2025 13:52:54 +0300 Subject: [PATCH] fixed incorrect suggestion order in Chinese and Japanese sometimes --- .../tt9/ime/modes/predictions/IdeogramPredictions.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/io/github/sspanak/tt9/ime/modes/predictions/IdeogramPredictions.java b/app/src/main/java/io/github/sspanak/tt9/ime/modes/predictions/IdeogramPredictions.java index 645deb03..2f3159b6 100644 --- a/app/src/main/java/io/github/sspanak/tt9/ime/modes/predictions/IdeogramPredictions.java +++ b/app/src/main/java/io/github/sspanak/tt9/ime/modes/predictions/IdeogramPredictions.java @@ -24,6 +24,12 @@ public class IdeogramPredictions extends WordPredictions { super(settings, textField); minWords = 1; 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; }