aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java
diff options
context:
space:
mode:
authorKeisuke Kuroyanagi <ksk@google.com>2014-02-09 22:13:56 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2014-02-09 22:13:56 -0800
commitb4fbf9ac2f309b23a8f1d7414839b424d1ffc149 (patch)
treec9c8dbe0a329eba313fc133aede741aef8be9d20 /java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java
parent4ed37fface9f53767a3f4cde22916e033a9e8bfd (diff)
parent2ef87aee3e36e2c1121b454e321e59b4b450dd82 (diff)
downloadlatinime-b4fbf9ac2f309b23a8f1d7414839b424d1ffc149.tar.gz
latinime-b4fbf9ac2f309b23a8f1d7414839b424d1ffc149.tar.xz
latinime-b4fbf9ac2f309b23a8f1d7414839b424d1ffc149.zip
am 2ef87aee: Merge "Make PtNode have ProbabilityInfo instead of raw value."
* commit '2ef87aee3e36e2c1121b454e321e59b4b450dd82': Make PtNode have ProbabilityInfo instead of raw value.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java')
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java b/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java
index 83707480d..1c74852fe 100644
--- a/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java
+++ b/java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java
@@ -81,14 +81,11 @@ public class Ver4DictDecoder extends AbstractDictDecoder {
// Insert unigrams to the fusion dictionary.
for (final WordProperty wordProperty : wordProperties) {
- // TODO: Support probability that is -1.
- final int probability = wordProperty.getProbability() < 0 ?
- 0 : wordProperty.getProbability();
if (wordProperty.mIsBlacklistEntry) {
fusionDict.addBlacklistEntry(wordProperty.mWord, wordProperty.mShortcutTargets,
wordProperty.mIsNotAWord);
} else {
- fusionDict.add(wordProperty.mWord, probability,
+ fusionDict.add(wordProperty.mWord, wordProperty.mProbabilityInfo,
wordProperty.mShortcutTargets, wordProperty.mIsNotAWord);
}
}
@@ -99,7 +96,7 @@ public class Ver4DictDecoder extends AbstractDictDecoder {
}
final String word0 = wordProperty.mWord;
for (final WeightedString bigram : wordProperty.mBigrams) {
- fusionDict.setBigram(word0, bigram.mWord, bigram.getProbability());
+ fusionDict.setBigram(word0, bigram.mWord, bigram.mProbabilityInfo);
}
}
return fusionDict;