diff options
author | 2012-05-29 00:25:50 -0700 | |
---|---|---|
committer | 2012-05-29 00:25:50 -0700 | |
commit | e382bcc39aa6aa64504a0fcd2ca59ad09dda0d25 (patch) | |
tree | 8bb5bedf42f73cc47af503bf17a9f571b2b724f8 /native/jni/src/binary_format.h | |
parent | c941bc9bd3eb5b564f8b5f63ff07a44097262671 (diff) | |
parent | 8f9f55dd9d27f6c759c12416c872138b9b4661dc (diff) | |
download | latinime-e382bcc39aa6aa64504a0fcd2ca59ad09dda0d25.tar.gz latinime-e382bcc39aa6aa64504a0fcd2ca59ad09dda0d25.tar.xz latinime-e382bcc39aa6aa64504a0fcd2ca59ad09dda0d25.zip |
am 8f9f55dd: Merge "Fix a bug where the bigram freq would be underevaluated" into jb-dev
* commit '8f9f55dd9d27f6c759c12416c872138b9b4661dc':
Fix a bug where the bigram freq would be underevaluated
Diffstat (limited to 'native/jni/src/binary_format.h')
-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. |