diff options
author | Peng Wu <alexepico@gmail.com> | 2018-12-10 15:33:07 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2018-12-10 15:33:07 +0800 |
commit | b708ceefcd64a699d1ef8af774c9bd469bf76174 (patch) | |
tree | 5f2df29e632a0f0a5668226b47df3a63a139bfc2 | |
parent | 5643eb4c61a7c7425311471057c6346668145612 (diff) | |
download | libpinyin-b708ceefcd64a699d1ef8af774c9bd469bf76174.tar.gz libpinyin-b708ceefcd64a699d1ef8af774c9bd469bf76174.tar.xz libpinyin-b708ceefcd64a699d1ef8af774c9bd469bf76174.zip |
update PhoneticLookup usage
-rw-r--r-- | src/pinyin.cpp | 4 | ||||
-rw-r--r-- | tests/lookup/test_pinyin_lookup.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp index 06903b8..9b45ec5 100644 --- a/src/pinyin.cpp +++ b/src/pinyin.cpp @@ -52,7 +52,7 @@ struct _pinyin_context_t{ Bigram * m_user_bigram; /* lookups. */ - PhoneticLookup<1, 3> * m_pinyin_lookup; + PhoneticLookup<2, 3> * m_pinyin_lookup; PhraseLookup * m_phrase_lookup; /* addon tables. */ @@ -370,7 +370,7 @@ pinyin_context_t * pinyin_init(const char * systemdir, const char * userdir){ gfloat lambda = context->m_system_table_info.get_lambda(); - context->m_pinyin_lookup = new PhoneticLookup<1, 3> + context->m_pinyin_lookup = new PhoneticLookup<2, 3> (lambda, context->m_pinyin_table, context->m_phrase_index, context->m_system_bigram, context->m_user_bigram); diff --git a/tests/lookup/test_pinyin_lookup.cpp b/tests/lookup/test_pinyin_lookup.cpp index 5ff418f..c1552b4 100644 --- a/tests/lookup/test_pinyin_lookup.cpp +++ b/tests/lookup/test_pinyin_lookup.cpp @@ -59,7 +59,7 @@ int main( int argc, char * argv[]){ gfloat lambda = system_table_info.get_lambda(); - PhoneticLookup<1, 3> pinyin_lookup(lambda, &largetable, &phrase_index, + PhoneticLookup<2, 3> pinyin_lookup(lambda, &largetable, &phrase_index, &system_bigram, &user_bigram); /* prepare the prefixes for get_nbest_match. */ |