From a742f0e61a9cc81ee14f5d66070bede4a737fa18 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Wed, 4 Jul 2012 15:19:05 +0800 Subject: [PATCH] uses pinyin_load_phrase_library --- src/PYLibPinyin.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PYLibPinyin.cc b/src/PYLibPinyin.cc index dd56fa7..621863b 100644 --- a/src/PYLibPinyin.cc +++ b/src/PYLibPinyin.cc @@ -64,6 +64,7 @@ LibPinyinBackEnd::allocPinyinInstance () g_free(userdir); userdir = NULL; } m_pinyin_context = pinyin_init ("/usr/share/libpinyin/data", userdir); + pinyin_load_phrase_library(m_pinyin_context, 2); g_free(userdir); } @@ -87,7 +88,8 @@ LibPinyinBackEnd::allocChewingInstance () if (retval) { g_free(userdir); userdir = NULL; } - m_chewing_context = pinyin_init ("/usr/share/libpinyin/data", NULL); + m_chewing_context = pinyin_init ("/usr/share/libpinyin/data", userdir); + pinyin_load_phrase_library(m_chewing_context, 2); g_free(userdir); } -- 2.7.4