diff options
author | Peng Wu <alexepico@gmail.com> | 2010-11-01 15:46:26 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2010-11-01 15:46:26 +0800 |
commit | 832849ace9a4e4f78fc3be8c8068de2cca51a533 (patch) | |
tree | 618a36f1583860138baacd98e97c0246655ca490 | |
parent | 559e721668ffe2be0e9a169408439d86dd9e068d (diff) | |
download | libpinyin-832849ace9a4e4f78fc3be8c8068de2cca51a533.tar.gz libpinyin-832849ace9a4e4f78fc3be8c8068de2cca51a533.tar.xz libpinyin-832849ace9a4e4f78fc3be8c8068de2cca51a533.zip |
strength reduce
-rw-r--r-- | src/lookup/pinyin_lookup.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lookup/pinyin_lookup.cpp b/src/lookup/pinyin_lookup.cpp index 37611d8..2d2e770 100644 --- a/src/lookup/pinyin_lookup.cpp +++ b/src/lookup/pinyin_lookup.cpp @@ -347,7 +347,8 @@ bool PinyinLookup::bigram_gen_next_step(int nstep, lookup_value_t * cur_step, ph lookup_value_t next_step; next_step.m_handles[0] = cur_step->m_handles[1]; next_step.m_handles[1] = token; next_step.m_poss = cur_step->m_poss + - log(( bigram_lambda * bigram_poss + unigram_lambda * unigram_poss) *pinyin_poss); + log(bigram_lambda * bigram_poss + unigram_lambda * unigram_poss) + + log( pinyin_poss); next_step.m_last_step = nstep; return save_next_step(nstep + phrase_length, cur_step, &next_step); |