diff options
author | 2012-05-29 00:27:54 -0700 | |
---|---|---|
committer | 2012-05-29 00:27:54 -0700 | |
commit | 14c72f071ea951a4ad5ce068c7944b135e859e48 (patch) | |
tree | 3d2f170f5819a863bf25bbe7ae0d2a48a856a600 | |
parent | 7a4a1a0c5cb585552375661e3c566114c2fe65fa (diff) | |
parent | e382bcc39aa6aa64504a0fcd2ca59ad09dda0d25 (diff) | |
download | latinime-14c72f071ea951a4ad5ce068c7944b135e859e48.tar.gz latinime-14c72f071ea951a4ad5ce068c7944b135e859e48.tar.xz latinime-14c72f071ea951a4ad5ce068c7944b135e859e48.zip |
am e382bcc3: am 8f9f55dd: Merge "Fix a bug where the bigram freq would be underevaluated" into jb-dev
* commit 'e382bcc39aa6aa64504a0fcd2ca59ad09dda0d25':
Fix a bug where the bigram freq would be underevaluated
-rw-r--r-- | native/jni/src/binary_format.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/native/jni/src/binary_format.h b/native/jni/src/binary_format.h index e42589b81..85fdd9418 100644 --- a/native/jni/src/binary_format.h +++ b/native/jni/src/binary_format.h @@ -537,7 +537,7 @@ inline int BinaryFormat::computeFrequencyForBigram(const int unigramFreq, const // while a value of 15 represents the middle of the top step. // See makedict.BinaryDictInputOutput for details. const float stepSize = ((float)MAX_FREQ - unigramFreq) / (1.5f + MAX_BIGRAM_FREQ); - return (int)(unigramFreq + bigramFreq * stepSize); + return (int)(unigramFreq + (bigramFreq + 1) * stepSize); } // This returns a probability in log space. |