diff options
author | 2012-08-17 02:54:09 -0700 | |
---|---|---|
committer | 2012-08-17 02:54:09 -0700 | |
commit | e03462bbac71059d0fba3487edc93d17af3eab81 (patch) | |
tree | afaf4774125ced1b491f82d3e6a79b68b0f06240 /java/src/com/android/inputmethod/latin/makedict/BinaryDictInputOutput.java | |
parent | 59ddbb5bf15a4d836f3a7973e9275037c907c65e (diff) | |
parent | 1b4dfd4ccbdda096edc86672dfdee698d3740c20 (diff) | |
download | latinime-e03462bbac71059d0fba3487edc93d17af3eab81.tar.gz latinime-e03462bbac71059d0fba3487edc93d17af3eab81.tar.xz latinime-e03462bbac71059d0fba3487edc93d17af3eab81.zip |
am 1b4dfd4c: am 1edd557c: Merge "Reword a confusing comment" into jb-mr1-dev
* commit '1b4dfd4ccbdda096edc86672dfdee698d3740c20':
Reword a confusing comment
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/BinaryDictInputOutput.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/makedict/BinaryDictInputOutput.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/BinaryDictInputOutput.java b/java/src/com/android/inputmethod/latin/makedict/BinaryDictInputOutput.java index 2c3eee74c..2fe91de89 100644 --- a/java/src/com/android/inputmethod/latin/makedict/BinaryDictInputOutput.java +++ b/java/src/com/android/inputmethod/latin/makedict/BinaryDictInputOutput.java @@ -783,10 +783,10 @@ public class BinaryDictInputOutput { // their lower bound and exclude their higher bound so we need to have the first step // start at exactly 1 unit higher than floor(unigramFreq + half a step). // Note : to reconstruct the score, the dictionary reader will need to divide - // MAX_TERMINAL_FREQUENCY - unigramFreq by 16.5 likewise, and add - // (discretizedFrequency + 0.5) times this value to get the median value of the step, - // which is the best approximation. This is how we get the most precise result with - // only four bits. + // MAX_TERMINAL_FREQUENCY - unigramFreq by 16.5 likewise to get the value of the step, + // and add (discretizedFrequency + 0.5 + 0.5) times this value to get the best + // approximation. (0.5 to get the first step start, and 0.5 to get the middle of the + // step pointed by the discretized frequency. final float stepSize = (MAX_TERMINAL_FREQUENCY - unigramFrequency) / (1.5f + MAX_BIGRAM_FREQUENCY); final float firstStepStart = 1 + unigramFrequency + (stepSize / 2.0f); |