summaryrefslogtreecommitdiffstats
path: root/src/lookup
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-09-10 13:08:51 +0800
committerPeng Wu <alexepico@gmail.com>2012-09-10 13:08:51 +0800
commita99fe32edd9a7d3e0600d1d13396ae84128688f7 (patch)
treeff027ae55ee1fe9fb9820031854e5347005f1b73 /src/lookup
parent9e8ed7cd7847f010da05f7f4d2a2c4f498693265 (diff)
downloadlibpinyin-a99fe32edd9a7d3e0600d1d13396ae84128688f7.tar.gz
libpinyin-a99fe32edd9a7d3e0600d1d13396ae84128688f7.tar.xz
libpinyin-a99fe32edd9a7d3e0600d1d13396ae84128688f7.zip
begin to write pinyin lookup2
Diffstat (limited to 'src/lookup')
-rw-r--r--src/lookup/pinyin_lookup2.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/lookup/pinyin_lookup2.cpp b/src/lookup/pinyin_lookup2.cpp
index 7b8095c..820f594 100644
--- a/src/lookup/pinyin_lookup2.cpp
+++ b/src/lookup/pinyin_lookup2.cpp
@@ -182,3 +182,25 @@ static void clear_steps(GPtrArray * steps_index, GPtrArray * steps_content){
}
}
+
+PinyinLookup2::PinyinLookup2(pinyin_option_t options,
+ FacadeChewingTable * pinyin_table,
+ FacadePhraseIndex * phrase_index,
+ Bigram * system_bigram,
+ Bigram * user_bigram){
+ m_options = options;
+ m_pinyin_table = pinyin_table;
+ m_phrase_index = phrase_index;
+ m_system_bigram = system_bigram;
+ m_user_bigram = user_bigram;
+
+ m_steps_index = g_ptr_array_new();
+ m_steps_content = g_ptr_array_new();
+}
+
+PinyinLookup2::~PinyinLookup2(){
+ clear_steps(m_steps_index, m_steps_content);
+ g_ptr_array_free(m_steps_index, TRUE);
+ g_ptr_array_free(m_steps_content, TRUE);
+}
+