diff options
author | 2014-02-10 15:05:08 +0900 | |
---|---|---|
committer | 2014-02-10 15:05:08 +0900 | |
commit | 8ffc631826b108423f98e3ff4d987f067cbc4e0c (patch) | |
tree | b3ed73c26dd44b2c6ba91fd65f02ea3d3e39c4b5 /java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java | |
parent | ab6a93773ba3cbe93002bc37b6b61f874fc09144 (diff) | |
download | latinime-8ffc631826b108423f98e3ff4d987f067cbc4e0c.tar.gz latinime-8ffc631826b108423f98e3ff4d987f067cbc4e0c.tar.xz latinime-8ffc631826b108423f98e3ff4d987f067cbc4e0c.zip |
Make PtNode have ProbabilityInfo instead of raw value.
Bug: 11281877
Bug: 12810574
Change-Id: Id1cda0afc74c4e30633c735729143491b2274a7b
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/makedict/Ver4DictDecoder.java | 7 |
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; |