aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java
diff options
context:
space:
mode:
authorKeisuke Kuroyanagi <ksk@google.com>2014-02-05 23:04:06 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2014-02-05 23:04:06 -0800
commit47f716e0f15aa3df7a7359fc42349b0c013f2095 (patch)
tree37fa6ad04bad4eda909c58c26e3d5d84b3064610 /java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java
parentb90e4cdfa63f85932c759a7473531f66b2bfb6c5 (diff)
parent337dce8074cea5d4d703ff0add4186681dbb3172 (diff)
downloadlatinime-47f716e0f15aa3df7a7359fc42349b0c013f2095.tar.gz
latinime-47f716e0f15aa3df7a7359fc42349b0c013f2095.tar.xz
latinime-47f716e0f15aa3df7a7359fc42349b0c013f2095.zip
am 337dce80: Merge "Consolidate WordProperty and Word."
* commit '337dce8074cea5d4d703ff0add4186681dbb3172': Consolidate WordProperty and Word.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java')
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java b/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java
index 9f2345962..782ada3f4 100644
--- a/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java
+++ b/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java
@@ -606,19 +606,21 @@ public final class BinaryDictDecoderUtils {
FusionDictionary newDict = new FusionDictionary(root, fileHeader.mDictionaryOptions);
if (null != dict) {
- for (final Word w : dict) {
- if (w.mIsBlacklistEntry) {
- newDict.addBlacklistEntry(w.mWord, w.mShortcutTargets, w.mIsNotAWord);
+ for (final WordProperty wordProperty : dict) {
+ if (wordProperty.mIsBlacklistEntry) {
+ newDict.addBlacklistEntry(wordProperty.mWord, wordProperty.mShortcutTargets,
+ wordProperty.mIsNotAWord);
} else {
- newDict.add(w.mWord, w.mFrequency, w.mShortcutTargets, w.mIsNotAWord);
+ newDict.add(wordProperty.mWord, wordProperty.getProbability(),
+ wordProperty.mShortcutTargets, wordProperty.mIsNotAWord);
}
}
- for (final Word w : dict) {
+ for (final WordProperty wordProperty : dict) {
// By construction a binary dictionary may not have bigrams pointing to
// words that are not also registered as unigrams so we don't have to avoid
// them explicitly here.
- for (final WeightedString bigram : w.mBigrams) {
- newDict.setBigram(w.mWord, bigram.mWord, bigram.getProbability());
+ for (final WeightedString bigram : wordProperty.mBigrams) {
+ newDict.setBigram(wordProperty.mWord, bigram.mWord, bigram.getProbability());
}
}
}