From 832849ace9a4e4f78fc3be8c8068de2cca51a533 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Mon, 1 Nov 2010 15:46:26 +0800 Subject: strength reduce --- src/lookup/pinyin_lookup.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lookup/pinyin_lookup.cpp') 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); -- cgit