diff options
author | Peng Wu <alexepico@gmail.com> | 2017-02-08 12:42:22 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2017-02-08 12:42:22 +0800 |
commit | 44e570de46e39b5e1ccc4133414cf8ae19e1868b (patch) | |
tree | 13c709484726404de1b5a5e9c74ea35f7c6201ab /src/lookup/phonetic_lookup.h | |
parent | dc963b598e14eec42e4fd22223f287253d424c47 (diff) | |
download | libpinyin-44e570de46e39b5e1ccc4133414cf8ae19e1868b.tar.gz libpinyin-44e570de46e39b5e1ccc4133414cf8ae19e1868b.tar.xz libpinyin-44e570de46e39b5e1ccc4133414cf8ae19e1868b.zip |
rename variables
Diffstat (limited to 'src/lookup/phonetic_lookup.h')
-rw-r--r-- | src/lookup/phonetic_lookup.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lookup/phonetic_lookup.h b/src/lookup/phonetic_lookup.h index f7d49af..c90c994 100644 --- a/src/lookup/phonetic_lookup.h +++ b/src/lookup/phonetic_lookup.h @@ -62,28 +62,28 @@ struct trellis_value_t { }; template <gint32 nbest> -static bool inline trellis_value_less_than(const trellis_value_t * exist_item, - const trellis_value_t * new_item) { +static bool inline trellis_value_less_than(const trellis_value_t * item_lhs, + const trellis_value_t * item_rhs) { #if 1 if (nbest > 1) { /* allow longer sentence */ - if (exist_item->m_sentence_length + 1 == new_item->m_sentence_length && - exist_item->m_poss + LONG_SENTENCE_PENALTY < new_item->m_poss) + if (item_lhs->m_sentence_length + 1 == item_rhs->m_sentence_length && + item_lhs->m_poss + LONG_SENTENCE_PENALTY < item_rhs->m_poss) return true; - if (exist_item->m_sentence_length == new_item->m_sentence_length + 1 && - exist_item->m_poss < new_item->m_poss + LONG_SENTENCE_PENALTY) + if (item_lhs->m_sentence_length == item_rhs->m_sentence_length + 1 && + item_lhs->m_poss < item_rhs->m_poss + LONG_SENTENCE_PENALTY) return true; } #endif /* the same length but better possibility */ - if (exist_item->m_sentence_length == new_item->m_sentence_length && - exist_item->m_poss < new_item->m_poss) + if (item_lhs->m_sentence_length == item_rhs->m_sentence_length && + item_lhs->m_poss < item_rhs->m_poss) return true; /* shorter sentence */ - if (exist_item->m_sentence_length > new_item->m_sentence_length) + if (item_lhs->m_sentence_length > item_rhs->m_sentence_length) return true; return false; |