From b79f409d67678275488bf803467dd48b00518309 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Tue, 4 Dec 2012 13:01:01 +0800 Subject: [PATCH] add comments --- src/pinyin.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/src/pinyin.h b/src/pinyin.h index 735dbfb..7113704 100644 --- a/src/pinyin.h +++ b/src/pinyin.h @@ -541,24 +541,76 @@ bool pinyin_get_pinyin_string(pinyin_instance_t * instance, ChewingKey * key, gchar ** utf8_str); +/** + * pinyin_token_get_phrase: + * @instance: the pinyin instance. + * @token: the phrase token. + * @len: the phrase length. + * @utf8_str: the phrase string. + * @returns: whether the get operation is successful. + * + * Get the phrase length and utf8 string. + * + */ bool pinyin_token_get_phrase(pinyin_instance_t * instance, phrase_token_t token, guint * len, gchar ** utf8_str); +/** + * pinyin_token_get_n_pronunciation: + * @instance: the pinyin instance. + * @token: the phrase token. + * @num: the number of pinyins. + * @returns: whether the get operation is successful. + * + * Get the number of the pinyins. + * + */ bool pinyin_token_get_n_pronunciation(pinyin_instance_t * instance, phrase_token_t token, guint * num); +/** + * pinyin_token_get_nth_pronunciation: + * @instance: the pinyin instance. + * @token: the phrase token. + * @nth: the index of the pinyin. + * @keys: the GArray of chewing key. + * @returns: whether the get operation is successful. + * + * Get the nth pinyin from the phrase. + * + */ bool pinyin_token_get_nth_pronunciation(pinyin_instance_t * instance, phrase_token_t token, guint nth, ChewingKeyVector keys); +/** + * pinyin_token_get_unigram_frequency: + * @instance: the pinyin instance. + * @token: the phrase token. + * @freq: the unigram frequency of the phrase. + * @returns: whether the get operation is successful. + * + * Get the unigram frequency of the phrase. + * + */ bool pinyin_token_get_unigram_frequency(pinyin_instance_t * instance, phrase_token_t token, guint * freq); +/** + * pinyin_token_add_unigram_frequency: + * @instance: the pinyin instance. + * @token: the phrase token. + * @delta: the delta of the unigram frequency. + * @returns: whether the add operation is successful. + * + * Add delta to the unigram frequency of the phrase token. + * + */ bool pinyin_token_add_unigram_frequency(pinyin_instance_t * instance, phrase_token_t token, guint delta); -- 2.34.1