diff options
author | Peng Wu <alexepico@gmail.com> | 2017-01-20 10:51:13 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2017-01-20 10:51:13 +0800 |
commit | c43f884dcb230ff7a29d5b05d53880ef37ecf85e (patch) | |
tree | 1248a5422684ec17a2f02fad50d0e189956750f0 | |
parent | 8003335fa85e0061d27779c5070c0336d9a4a1d4 (diff) | |
download | libpinyin-c43f884dcb230ff7a29d5b05d53880ef37ecf85e.tar.gz libpinyin-c43f884dcb230ff7a29d5b05d53880ef37ecf85e.tar.xz libpinyin-c43f884dcb230ff7a29d5b05d53880ef37ecf85e.zip |
fixes typos
-rw-r--r-- | src/lookup/phonetic_lookup.h | 4 | ||||
-rw-r--r-- | src/lookup/phonetic_lookup_heap.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lookup/phonetic_lookup.h b/src/lookup/phonetic_lookup.h index 6c5dc8d..ba3c11e 100644 --- a/src/lookup/phonetic_lookup.h +++ b/src/lookup/phonetic_lookup.h @@ -62,7 +62,7 @@ static bool inline trellis_value_less_than(const trellis_value_t * exist_item, 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) + exist_item->m_poss + LONG_SENTENCE_PENALTY < new_item->m_poss) return true; } @@ -76,7 +76,7 @@ static bool inline trellis_value_less_than(const trellis_value_t * exist_item, if (nbest > 1) { /* allow longer sentence */ if (exist_item->m_sentence_length == new_item->m_sentence_length + 1 && - exist_item->m_poss < new_item->m_poss * LONG_SENTENCE_PENALTY) + exist_item->m_poss < new_item->m_poss + LONG_SENTENCE_PENALTY) return true; } diff --git a/src/lookup/phonetic_lookup_heap.h b/src/lookup/phonetic_lookup_heap.h index bd64955..ac25768 100644 --- a/src/lookup/phonetic_lookup_heap.h +++ b/src/lookup/phonetic_lookup_heap.h @@ -98,7 +98,7 @@ public: /* return true if the item is stored into m_element. */ bool eval_item(const trellis_value_t * item) { - if (compare_tellis_value<nbest>(&m_element, item)) { + if (trellis_value_less_than<1>(&m_element, item)) { m_element = *item; return true; } |