summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-08-07 13:36:16 +0800
committerPeng Wu <alexepico@gmail.com>2012-08-07 13:36:16 +0800
commitae01f6123774073d6f3504098ec6e6d2955620ea (patch)
tree7cbce8fe07e68d3e4c36bb4b4c32478658734053
parent28062ae7f665da020fec7e75754966a6209c2525 (diff)
downloadlibpinyin-ae01f6123774073d6f3504098ec6e6d2955620ea.tar.gz
libpinyin-ae01f6123774073d6f3504098ec6e6d2955620ea.tar.xz
libpinyin-ae01f6123774073d6f3504098ec6e6d2955620ea.zip
add comments for new apis
-rw-r--r--src/pinyin.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/pinyin.h b/src/pinyin.h
index 4a01c5f..9e07719 100644
--- a/src/pinyin.h
+++ b/src/pinyin.h
@@ -438,6 +438,16 @@ bool pinyin_clear_constraint(pinyin_instance_t * instance,
*/
bool pinyin_clear_constraints(pinyin_instance_t * instance);
+/**
+ * pinyin_lookup_token:
+ * @instance: the pinyin instance.
+ * @phrase: the phrase to be looked up.
+ * @token: the returned phrase token.
+ * @returns: whether the lookup operation is successful.
+ *
+ * Lookup the token for the phrase utf8 string.
+ *
+ */
bool pinyin_lookup_token(pinyin_instance_t * instance,
const char * phrase, phrase_token_t * token);
@@ -456,6 +466,16 @@ bool pinyin_lookup_token(pinyin_instance_t * instance,
bool pinyin_translate_token(pinyin_instance_t * instance,
phrase_token_t token, char ** word);
+/**
+ * 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);