aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/utils/CombinedFormatUtils.java
diff options
context:
space:
mode:
authorKeisuke Kuroyanagi <ksk@google.com>2014-10-01 07:53:03 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-10-01 07:53:04 +0000
commit108dad1491d44bf381fdb5d4f0767fb251f28522 (patch)
tree8da56a5ec729e59e7dfb0185617ce871626f2da6 /java/src/com/android/inputmethod/latin/utils/CombinedFormatUtils.java
parent7b673c72651aa7dbfc3fc87fe2190d8cffb320c1 (diff)
parentc6a6f6a9905ab98516d944ac85933d016e4147fb (diff)
downloadlatinime-108dad1491d44bf381fdb5d4f0767fb251f28522.tar.gz
latinime-108dad1491d44bf381fdb5d4f0767fb251f28522.tar.xz
latinime-108dad1491d44bf381fdb5d4f0767fb251f28522.zip
Merge "Introduce NgramProperty in Java side."
Diffstat (limited to 'java/src/com/android/inputmethod/latin/utils/CombinedFormatUtils.java')
-rw-r--r--java/src/com/android/inputmethod/latin/utils/CombinedFormatUtils.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/java/src/com/android/inputmethod/latin/utils/CombinedFormatUtils.java b/java/src/com/android/inputmethod/latin/utils/CombinedFormatUtils.java
index 34f59e8bc..7e8e55990 100644
--- a/java/src/com/android/inputmethod/latin/utils/CombinedFormatUtils.java
+++ b/java/src/com/android/inputmethod/latin/utils/CombinedFormatUtils.java
@@ -67,7 +67,7 @@ public class CombinedFormatUtils {
builder.append("," + BLACKLISTED_TAG + "=true");
}
builder.append("\n");
- if (wordProperty.mShortcutTargets != null) {
+ if (wordProperty.mHasShortcuts) {
for (final WeightedString shortcutTarget : wordProperty.mShortcutTargets) {
builder.append(" " + SHORTCUT_TAG + "=" + shortcutTarget.mWord);
builder.append(",");
@@ -75,8 +75,9 @@ public class CombinedFormatUtils {
builder.append("\n");
}
}
- if (wordProperty.mBigrams != null) {
- for (final WeightedString bigram : wordProperty.mBigrams) {
+ if (wordProperty.mHasNgrams) {
+ // TODO: Support ngram.
+ for (final WeightedString bigram : wordProperty.getBigrams()) {
builder.append(" " + BIGRAM_TAG + "=" + bigram.mWord);
builder.append(",");
builder.append(formatProbabilityInfo(bigram.mProbabilityInfo));