am 1b4dfd4c: am 1edd557c: Merge "Reword a confusing comment" into jb-mr1-dev

* commit '1b4dfd4ccbdda096edc86672dfdee698d3740c20':
  Reword a confusing comment
main
Jean Chalard 2012-08-17 02:54:09 -07:00 committed by Android Git Automerger
commit e03462bbac
1 changed files with 4 additions and 4 deletions

View File

@ -783,10 +783,10 @@ public class BinaryDictInputOutput {
// their lower bound and exclude their higher bound so we need to have the first step // 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). // start at exactly 1 unit higher than floor(unigramFreq + half a step).
// Note : to reconstruct the score, the dictionary reader will need to divide // Note : to reconstruct the score, the dictionary reader will need to divide
// MAX_TERMINAL_FREQUENCY - unigramFreq by 16.5 likewise, and add // MAX_TERMINAL_FREQUENCY - unigramFreq by 16.5 likewise to get the value of the step,
// (discretizedFrequency + 0.5) times this value to get the median value of the step, // and add (discretizedFrequency + 0.5 + 0.5) times this value to get the best
// which is the best approximation. This is how we get the most precise result with // approximation. (0.5 to get the first step start, and 0.5 to get the middle of the
// only four bits. // step pointed by the discretized frequency.
final float stepSize = final float stepSize =
(MAX_TERMINAL_FREQUENCY - unigramFrequency) / (1.5f + MAX_BIGRAM_FREQUENCY); (MAX_TERMINAL_FREQUENCY - unigramFrequency) / (1.5f + MAX_BIGRAM_FREQUENCY);
final float firstStepStart = 1 + unigramFrequency + (stepSize / 2.0f); final float firstStepStart = 1 + unigramFrequency + (stepSize / 2.0f);