aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-10-24 13:24:59 +0900
committerJean Chalard <jchalard@google.com>2012-10-24 13:24:59 +0900
commitddb0bcc051c1e9f2706f3702f0bb3135e4352f7b (patch)
tree3b5e9a610fbb3bf3eeea8cc8a26200c68ac407f1 /java/src
parent1ec8299389be6c0adcb19724ebdbf00bb9a5f874 (diff)
downloadlatinime-ddb0bcc051c1e9f2706f3702f0bb3135e4352f7b.tar.gz
latinime-ddb0bcc051c1e9f2706f3702f0bb3135e4352f7b.tar.xz
latinime-ddb0bcc051c1e9f2706f3702f0bb3135e4352f7b.zip
Fix a bug where a bigram would be ignored
Bug: 7403386 Change-Id: I89f495d07f7059a9f1ccd97d487c2f2657a8ebd2
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java b/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
index 6f1faa192..7fd13d78b 100644
--- a/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
+++ b/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
@@ -358,6 +358,10 @@ public final class FusionDictionary implements Iterable<Word> {
if (charGroup2 == null) {
add(getCodePoints(word2), 0, null, false /* isNotAWord */,
false /* isBlacklistEntry */);
+ // The chargroup for the first word may have moved by the above insertion,
+ // if word1 and word2 share a common stem that happens not to have been
+ // a cutting point until now. In this case, we need to refresh charGroup.
+ charGroup = findWordInTree(mRoot, word1);
}
charGroup.addBigram(word2, frequency);
} else {