From df1d3e733e2b000c776e74b54d3c62f0d433b013 Mon Sep 17 00:00:00 2001 From: Keisuke Kuroyanagi Date: Wed, 5 Feb 2014 21:44:55 +0900 Subject: Make WeightedString have ProbabilityInfo. Bug: 11281877 Bug: 12810574 Change-Id: I265e3d8654c75766cd0e0d09d67ef62b4566298a --- .../android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java') diff --git a/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java b/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java index 369184573..9f2345962 100644 --- a/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java +++ b/java/src/com/android/inputmethod/latin/makedict/BinaryDictDecoderUtils.java @@ -511,7 +511,7 @@ public final class BinaryDictDecoderUtils { final WeightedString word = getWordAtPosition(dictDecoder, headerSize, bigram.mAddress, options); final int reconstructedFrequency = - BinaryDictIOUtils.reconstructBigramFrequency(word.mFrequency, + BinaryDictIOUtils.reconstructBigramFrequency(word.getProbability(), bigram.mFrequency); bigrams.add(new WeightedString(word.mWord, reconstructedFrequency)); } @@ -618,7 +618,7 @@ public final class BinaryDictDecoderUtils { // 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.mFrequency); + newDict.setBigram(w.mWord, bigram.mWord, bigram.getProbability()); } } } -- cgit v1.2.3-83-g751a