From c43f884dcb230ff7a29d5b05d53880ef37ecf85e Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Fri, 20 Jan 2017 10:51:13 +0800 Subject: fixes typos --- src/lookup/phonetic_lookup.h | 4 ++-- 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(&m_element, item)) { + if (trellis_value_less_than<1>(&m_element, item)) { m_element = *item; return true; } -- cgit