diff options
Diffstat (limited to 'src/zhuyin.cpp')
-rw-r--r-- | src/zhuyin.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/zhuyin.cpp b/src/zhuyin.cpp index f4e28d8..1b9cda5 100644 --- a/src/zhuyin.cpp +++ b/src/zhuyin.cpp @@ -47,7 +47,7 @@ struct _zhuyin_context_t{ Bigram * m_user_bigram; /* lookups. */ - PhoneticLookup<1> * m_pinyin_lookup; + PhoneticLookup<1, 1> * m_pinyin_lookup; PhraseLookup * m_phrase_lookup; char * m_system_dir; @@ -345,7 +345,7 @@ zhuyin_context_t * zhuyin_init(const char * systemdir, const char * userdir){ gfloat lambda = context->m_system_table_info.get_lambda(); - context->m_pinyin_lookup = new PhoneticLookup<1> + context->m_pinyin_lookup = new PhoneticLookup<1, 1> ( lambda, context->m_pinyin_table, context->m_phrase_index, context->m_system_bigram, context->m_user_bigram); @@ -1007,9 +1007,10 @@ bool zhuyin_parse_full_pinyin(zhuyin_instance_t * instance, /* disable the pinyin correction options. */ options &= ~PINYIN_CORRECT_ALL; + gint16 distance = 0; int pinyin_len = strlen(onepinyin); bool retval = context->m_full_pinyin_parser->parse_one_key - (options, *onekey, onepinyin, pinyin_len); + (options, *onekey, distance, onepinyin, pinyin_len); return retval; } @@ -1047,9 +1048,10 @@ bool zhuyin_parse_chewing(zhuyin_instance_t * instance, zhuyin_context_t * & context = instance->m_context; zhuyin_option_t options = context->m_options; + gint16 distance = 0; int chewing_len = strlen(onechewing); bool retval = context->m_chewing_parser->parse_one_key - (options, *onekey, onechewing, chewing_len ); + (options, *onekey, distance, onechewing, chewing_len); return retval; } |