From: Peng Wu Date: Wed, 5 Dec 2012 03:07:53 +0000 (+0800) Subject: remove pinyin_get_pinyins_from_token X-Git-Tag: 0.8.91~44 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a981d9a0704b84b04b90dcedfcf96c20c9ed4bb8;p=platform%2Fupstream%2Flibpinyin.git remove pinyin_get_pinyins_from_token --- diff --git a/src/libpinyin.ver b/src/libpinyin.ver index 847fa97..a156215 100644 --- a/src/libpinyin.ver +++ b/src/libpinyin.ver @@ -30,7 +30,6 @@ LIBPINYIN { pinyin_choose_candidate; pinyin_free_candidates; pinyin_lookup_tokens; - pinyin_get_pinyins_from_token; pinyin_train; pinyin_reset; pinyin_get_chewing_string; 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; diff --git a/src/pinyin.h b/src/pinyin.h index 25cf932..9c2618e 100644 --- a/src/pinyin.h +++ b/src/pinyin.h @@ -444,19 +444,6 @@ bool pinyin_lookup_tokens(pinyin_instance_t * instance, const char * phrase, GArray * tokenarray); /** - * pinyin_get_pinyins_from_token: - * @instance: the pinyin instance. - * @token: the character token. - * @pinyinkeys: the pinyin keys from the character token. - * @returns: whether the pinyin keys is retrieved. - * - * Get the pinyin keys for the character token. - * - */ -bool pinyin_get_pinyins_from_token(pinyin_instance_t * instance, - phrase_token_t token, GArray * pinyinkeys); - -/** * pinyin_train: * @instance: the pinyin instance. * @returns: whether the sentence is trained.