summaryrefslogtreecommitdiffstats
path: root/src/pinyin.cpp
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-12-05 11:07:53 +0800
committerPeng Wu <alexepico@gmail.com>2012-12-05 11:07:53 +0800
commita981d9a0704b84b04b90dcedfcf96c20c9ed4bb8 (patch)
tree5a72d892114920556a90455f49540c087f10f0dd /src/pinyin.cpp
parenta772331638cce1d581da85fd3300fb00ba1acd2a (diff)
downloadlibpinyin-a981d9a0704b84b04b90dcedfcf96c20c9ed4bb8.tar.gz
libpinyin-a981d9a0704b84b04b90dcedfcf96c20c9ed4bb8.tar.xz
libpinyin-a981d9a0704b84b04b90dcedfcf96c20c9ed4bb8.zip
remove pinyin_get_pinyins_from_token
Diffstat (limited to 'src/pinyin.cpp')
-rw-r--r--src/pinyin.cpp21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp
index 9f886ea..dff7381 100644
--- a/src/pinyin.cpp
+++ b/src/pinyin.cpp
@@ -1709,27 +1709,6 @@ bool pinyin_lookup_tokens(pinyin_instance_t * instance,
return SEARCH_OK & retval;
}
-bool pinyin_get_pinyins_from_token(pinyin_instance_t * instance,
- phrase_token_t token, GArray * pinyinkeys){
- pinyin_context_t * & context = instance->m_context;
- FacadePhraseIndex * & phrase_index = context->m_phrase_index;
- PhraseItem item;
-
- int retval = phrase_index->get_phrase_item(token, item);
- if (1 != item.get_phrase_length())
- return false;
-
- guint8 npinyin = item.get_n_pronunciation();
- size_t i;
- ChewingKey onekey; guint32 freq;
- for (i = 0; i < npinyin; ++i){
- item.get_nth_pronunciation(i, &onekey, freq);
- g_array_append_val(pinyinkeys, onekey);
- }
- return true;
-}
-
-
bool pinyin_train(pinyin_instance_t * instance){
if (!instance->m_context->m_user_dir)
return false;