diff options
author | Peng Wu <alexepico@gmail.com> | 2016-05-27 13:48:09 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2016-05-27 13:48:09 +0800 |
commit | d393fb21d62a46e9faa94deb14227e43c4e44109 (patch) | |
tree | ae1f52b445aceef3dd85a1e1475e2a69cb4e92a3 /src/lookup/pinyin_lookup2.cpp | |
parent | db55283f014cfa5abd35c3be76e655bc1ee677ff (diff) | |
download | libpinyin-d393fb21d62a46e9faa94deb14227e43c4e44109.tar.gz libpinyin-d393fb21d62a46e9faa94deb14227e43c4e44109.tar.xz libpinyin-d393fb21d62a46e9faa94deb14227e43c4e44109.zip |
update class PinyinLookup2
Diffstat (limited to 'src/lookup/pinyin_lookup2.cpp')
-rw-r--r-- | src/lookup/pinyin_lookup2.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lookup/pinyin_lookup2.cpp b/src/lookup/pinyin_lookup2.cpp index d1aad4d..b2503bf 100644 --- a/src/lookup/pinyin_lookup2.cpp +++ b/src/lookup/pinyin_lookup2.cpp @@ -186,7 +186,6 @@ static void clear_steps(GPtrArray * steps_index, GPtrArray * steps_content){ PinyinLookup2::PinyinLookup2(const gfloat lambda, - pinyin_option_t options, FacadeChewingTable2 * pinyin_table, FacadePhraseIndex * phrase_index, Bigram * system_bigram, @@ -194,7 +193,6 @@ PinyinLookup2::PinyinLookup2(const gfloat lambda, : bigram_lambda(lambda), unigram_lambda(1. - lambda) { - m_options = options; m_pinyin_table = pinyin_table; m_phrase_index = phrase_index; m_system_bigram = system_bigram; @@ -408,7 +406,7 @@ bool PinyinLookup2::unigram_gen_next_step(int start, int end, return false; gfloat pinyin_poss = compute_pronunciation_possibility - (m_options, m_matrix, start, end, m_cached_keys, m_cached_phrase_item); + (m_matrix, start, end, m_cached_keys, m_cached_phrase_item); if (pinyin_poss < FLT_EPSILON ) return false; @@ -436,7 +434,7 @@ bool PinyinLookup2::bigram_gen_next_step(int start, int end, return false; gfloat pinyin_poss = compute_pronunciation_possibility - (m_options, m_matrix, start, end, m_cached_keys, m_cached_phrase_item); + (m_matrix, start, end, m_cached_keys, m_cached_phrase_item); if ( pinyin_poss < FLT_EPSILON ) return false; @@ -613,7 +611,7 @@ bool PinyinLookup2::train_result2(PhoneticKeyMatrix * matrix, /* train uni-gram */ m_phrase_index->get_phrase_item(*token, m_cached_phrase_item); increase_pronunciation_possibility - (m_options, matrix, i, constraint->m_end, + (matrix, i, constraint->m_end, m_cached_keys, m_cached_phrase_item, seed * pinyin_factor); m_phrase_index->add_unigram_frequency (*token, seed * unigram_factor); @@ -723,7 +721,7 @@ bool PinyinLookup2::validate_constraint(PhoneticKeyMatrix * matrix, } gfloat pinyin_poss = compute_pronunciation_possibility - (m_options, matrix, i, end, + (matrix, i, end, m_cached_keys, m_cached_phrase_item); /* clear invalid pinyin */ if (pinyin_poss < FLT_EPSILON) |