From bd477f3e4e99b7eb5c7813ced5df75c87a938df3 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Tue, 22 Oct 2013 10:43:15 +0800 Subject: update zhuyin.h --- src/zhuyin.h | 302 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 151 insertions(+), 151 deletions(-) diff --git a/src/zhuyin.h b/src/zhuyin.h index ebbc954..c05e553 100644 --- a/src/zhuyin.h +++ b/src/zhuyin.h @@ -33,8 +33,8 @@ G_BEGIN_DECLS typedef struct _ChewingKey ChewingKey; typedef struct _ChewingKeyRest ChewingKeyRest; -typedef struct _pinyin_context_t pinyin_context_t; -typedef struct _pinyin_instance_t pinyin_instance_t; +typedef struct _zhuyin_context_t zhuyin_context_t; +typedef struct _zhuyin_instance_t zhuyin_instance_t; typedef struct _lookup_candidate_t lookup_candidate_t; typedef struct _import_iterator_t import_iterator_t; @@ -46,7 +46,7 @@ typedef enum _lookup_candidate_type_t{ } lookup_candidate_type_t; /** - * pinyin_init: + * zhuyin_init: * @systemdir: the system wide language model data directory. * @userdir: the user's language model data directory. * @returns: the newly created pinyin context, NULL if failed. @@ -54,46 +54,46 @@ typedef enum _lookup_candidate_type_t{ * Create a new pinyin context. * */ -pinyin_context_t * pinyin_init(const char * systemdir, const char * userdir); +zhuyin_context_t * zhuyin_init(const char * systemdir, const char * userdir); /** - * pinyin_load_phrase_library: - * @context: the pinyin context. + * zhuyin_load_phrase_library: + * @context: the zhuyin context. * @index: the phrase index to be loaded. * @returns: whether the load succeeded. * * Load the sub phrase library of the index. * */ -bool pinyin_load_phrase_library(pinyin_context_t * context, +bool zhuyin_load_phrase_library(zhuyin_context_t * context, guint8 index); /** - * pinyin_unload_phrase_library: - * @context: the pinyin context. + * zhuyin_unload_phrase_library: + * @context: the zhuyin context. * @index: the phrase index to be unloaded. * @returns: whether the unload succeeded. * * Unload the sub phrase library of the index. * */ -bool pinyin_unload_phrase_library(pinyin_context_t * context, +bool zhuyin_unload_phrase_library(zhuyin_context_t * context, guint8 index); /** - * pinyin_begin_add_phrases: - * @context: the pinyin context. + * zhuyin_begin_add_phrases: + * @context: the zhuyin context. * @index: the phrase index to be imported. * @returns: the import iterator. * * Begin to add phrases. * */ -import_iterator_t * pinyin_begin_add_phrases(pinyin_context_t * context, +import_iterator_t * zhuyin_begin_add_phrases(zhuyin_context_t * context, guint8 index); /** - * pinyin_iterator_add_phrase: + * zhuyin_iterator_add_phrase: * @iter: the import iterator. * @phrase: the phrase string. * @pinyin: the pinyin string. @@ -103,67 +103,67 @@ import_iterator_t * pinyin_begin_add_phrases(pinyin_context_t * context, * Add a pair of phrase and pinyin with count. * */ -bool pinyin_iterator_add_phrase(import_iterator_t * iter, +bool zhuyin_iterator_add_phrase(import_iterator_t * iter, const char * phrase, const char * pinyin, gint count); /** - * pinyin_end_add_phrases: + * zhuyin_end_add_phrases: * @iter: the import iterator. * * End adding phrases. * */ -void pinyin_end_add_phrases(import_iterator_t * iter); +void zhuyin_end_add_phrases(import_iterator_t * iter); /** - * pinyin_save: - * @context: the pinyin context to be saved into user directory. + * zhuyin_save: + * @context: the zhuyin context to be saved into user directory. * @returns: whether the save succeeded. * - * Save the user's self-learning information of the pinyin context. + * Save the user's self-learning information of the zhuyin context. * */ -bool pinyin_save(pinyin_context_t * context); +bool zhuyin_save(zhuyin_context_t * context); /** - * pinyin_set_chewing_scheme: - * @context: the pinyin context. + * zhuyin_set_chewing_scheme: + * @context: the zhuyin context. * @scheme: the chewing scheme. * @returns: whether the set chewing scheme succeeded. * - * Change the chewing scheme of the pinyin context. + * Change the chewing scheme of the zhuyin context. * */ -bool pinyin_set_chewing_scheme(pinyin_context_t * context, +bool zhuyin_set_chewing_scheme(zhuyin_context_t * context, ChewingScheme scheme); /** - * pinyin_set_full_pinyin_scheme: - * @context: the pinyin context. + * zhuyin_set_full_pinyin_scheme: + * @context: the zhuyin context. * @scheme: the full pinyin scheme. * @returns: whether the set full pinyin scheme succeeded. * - * Change the full pinyin scheme of the pinyin context. + * Change the full pinyin scheme of the zhuyin context. * */ -bool pinyin_set_full_pinyin_scheme(pinyin_context_t * context, +bool zhuyin_set_full_pinyin_scheme(zhuyin_context_t * context, FullPinyinScheme scheme); /** - * pinyin_fini: - * @context: the pinyin context. + * zhuyin_fini: + * @context: the zhuyin context. * - * Finalize the pinyin context. + * Finalize the zhuyin context. * */ -void pinyin_fini(pinyin_context_t * context); +void zhuyin_fini(zhuyin_context_t * context); /** - * pinyin_mask_out: - * @context: the pinyin context. + * zhuyin_mask_out: + * @context: the zhuyin context. * @mask: the mask. * @value: the value. * @returns: whether the mask out operation is successful. @@ -171,80 +171,80 @@ void pinyin_fini(pinyin_context_t * context); * Mask out the matched phrase tokens. * */ -bool pinyin_mask_out(pinyin_context_t * context, +bool zhuyin_mask_out(zhuyin_context_t * context, phrase_token_t mask, phrase_token_t value); /** - * pinyin_set_options: - * @context: the pinyin context. - * @options: the pinyin options of the pinyin context. + * zhuyin_set_options: + * @context: the zhuyin context. + * @options: the pinyin options of the zhuyin context. * @returns: whether the set options scheme succeeded. * - * Set the options of the pinyin context. + * Set the options of the zhuyin context. * */ -bool pinyin_set_options(pinyin_context_t * context, +bool zhuyin_set_options(zhuyin_context_t * context, pinyin_option_t options); /** - * pinyin_alloc_instance: - * @context: the pinyin context. + * zhuyin_alloc_instance: + * @context: the zhuyin context. * @returns: the newly allocated pinyin instance, NULL if failed. * * Allocate a new pinyin instance from the context. * */ -pinyin_instance_t * pinyin_alloc_instance(pinyin_context_t * context); +zhuyin_instance_t * zhuyin_alloc_instance(zhuyin_context_t * context); /** - * pinyin_free_instance: - * @instance: the pinyin instance. + * zhuyin_free_instance: + * @instance: the zhuyin instance. * - * Free the pinyin instance. + * Free the zhuyin instance. * */ -void pinyin_free_instance(pinyin_instance_t * instance); +void zhuyin_free_instance(zhuyin_instance_t * instance); /** - * pinyin_guess_sentence: - * @instance: the pinyin instance. + * zhuyin_guess_sentence: + * @instance: the zhuyin instance. * @returns: whether the sentence are guessed successfully. * * Guess a sentence from the saved pinyin keys in the instance. * */ -bool pinyin_guess_sentence(pinyin_instance_t * instance); +bool zhuyin_guess_sentence(zhuyin_instance_t * instance); /** - * pinyin_guess_sentence_with_prefix: - * @instance: the pinyin instance. + * zhuyin_guess_sentence_with_prefix: + * @instance: the zhuyin instance. * @prefix: the prefix before the sentence. * @returns: whether the sentence are guessed successfully. * * Guess a sentence from the saved pinyin keys with a prefix. * */ -bool pinyin_guess_sentence_with_prefix(pinyin_instance_t * instance, +bool zhuyin_guess_sentence_with_prefix(zhuyin_instance_t * instance, const char * prefix); /** - * pinyin_phrase_segment: - * @instance: the pinyin instance. + * zhuyin_phrase_segment: + * @instance: the zhuyin instance. * @sentence: the utf-8 sentence to be segmented. * @returns: whether the sentence are segmented successfully. * * Segment a sentence and saved the result in the instance. * */ -bool pinyin_phrase_segment(pinyin_instance_t * instance, +bool zhuyin_phrase_segment(zhuyin_instance_t * instance, const char * sentence); /** - * pinyin_get_sentence: - * @instance: the pinyin instance. + * zhuyin_get_sentence: + * @instance: the zhuyin instance. * @sentence: the saved sentence in the instance. * @returns: whether the sentence is already saved in the instance. * @@ -253,12 +253,12 @@ bool pinyin_phrase_segment(pinyin_instance_t * instance, * Note: the returned sentence should be freed by g_free(). * */ -bool pinyin_get_sentence(pinyin_instance_t * instance, +bool zhuyin_get_sentence(zhuyin_instance_t * instance, char ** sentence); /** - * pinyin_parse_full_pinyin: - * @instance: the pinyin instance. + * zhuyin_parse_full_pinyin: + * @instance: the zhuyin instance. * @onepinyin: a single full pinyin to be parsed. * @onekey: the parsed key. * @returns: whether the parse is successfully. @@ -266,25 +266,25 @@ bool pinyin_get_sentence(pinyin_instance_t * instance, * Parse a single full pinyin. * */ -bool pinyin_parse_full_pinyin(pinyin_instance_t * instance, +bool zhuyin_parse_full_pinyin(zhuyin_instance_t * instance, const char * onepinyin, ChewingKey * onekey); /** - * pinyin_parse_more_full_pinyins: - * @instance: the pinyin instance. + * zhuyin_parse_more_full_pinyins: + * @instance: the zhuyin instance. * @pinyins: the full pinyins to be parsed. * @returns: the parsed length of the full pinyins. * * Parse multiple full pinyins and save it in the instance. * */ -size_t pinyin_parse_more_full_pinyins(pinyin_instance_t * instance, +size_t zhuyin_parse_more_full_pinyins(zhuyin_instance_t * instance, const char * pinyins); /** - * pinyin_parse_chewing: - * @instance: the pinyin instance. + * zhuyin_parse_chewing: + * @instance: the zhuyin instance. * @onechewing: the single chewing to be parsed. * @onekey: the parsed key. * @returns: whether the parse is successfully. @@ -292,25 +292,25 @@ size_t pinyin_parse_more_full_pinyins(pinyin_instance_t * instance, * Parse a single chewing. * */ -bool pinyin_parse_chewing(pinyin_instance_t * instance, +bool zhuyin_parse_chewing(zhuyin_instance_t * instance, const char * onechewing, ChewingKey * onekey); /** - * pinyin_parse_more_chewings: - * @instance: the pinyin instance. + * zhuyin_parse_more_chewings: + * @instance: the zhuyin instance. * @chewings: the chewings to be parsed. * @returns: the parsed length of the chewings. * * Parse multiple chewings and save it in the instance. * */ -size_t pinyin_parse_more_chewings(pinyin_instance_t * instance, +size_t zhuyin_parse_more_chewings(zhuyin_instance_t * instance, const char * chewings); /** - * pinyin_in_chewing_keyboard: - * @instance: the pinyin instance. + * zhuyin_in_chewing_keyboard: + * @instance: the zhuyin instance. * @key: the input key. * @symbol: the chewing symbol. * @returns: whether the key is in current chewing scheme. @@ -318,23 +318,23 @@ size_t pinyin_parse_more_chewings(pinyin_instance_t * instance, * Check whether the input key is in current chewing scheme. * */ -bool pinyin_in_chewing_keyboard(pinyin_instance_t * instance, +bool zhuyin_in_chewing_keyboard(zhuyin_instance_t * instance, const char key, const char ** symbol); /** - * pinyin_guess_candidates: - * @instance: the pinyin instance. + * zhuyin_guess_candidates: + * @instance: the zhuyin instance. * @offset: the offset in the pinyin keys. * @returns: whether a list of tokens are gotten. * * Guess the candidates at the offset. * */ -bool pinyin_guess_candidates(pinyin_instance_t * instance, +bool zhuyin_guess_candidates(zhuyin_instance_t * instance, size_t offset); /** - * pinyin_choose_candidate: - * @instance: the pinyin instance. + * zhuyin_choose_candidate: + * @instance: the zhuyin instance. * @offset: the offset in the pinyin keys. * @candidate: the selected candidate. * @returns: the cursor after the chosen candidate. @@ -342,25 +342,25 @@ bool pinyin_guess_candidates(pinyin_instance_t * instance, * Choose a full pinyin candidate at the offset. * */ -int pinyin_choose_candidate(pinyin_instance_t * instance, +int zhuyin_choose_candidate(zhuyin_instance_t * instance, size_t offset, lookup_candidate_t * candidate); /** -* pinyin_clear_constraint: -* @instance: the pinyin instance. +* zhuyin_clear_constraint: +* @instance: the zhuyin instance. * @offset: the offset in the pinyin keys. * @returns: whether the constraint is cleared. * * Clear the previous chosen candidate. * */ -bool pinyin_clear_constraint(pinyin_instance_t * instance, +bool zhuyin_clear_constraint(zhuyin_instance_t * instance, size_t offset); /** - * pinyin_lookup_tokens: - * @instance: the pinyin instance. + * zhuyin_lookup_tokens: + * @instance: the zhuyin instance. * @phrase: the phrase to be looked up. * @tokenarray: the returned GArray of tokens. * @returns: whether the lookup operation is successful. @@ -368,32 +368,32 @@ bool pinyin_clear_constraint(pinyin_instance_t * instance, * Lookup the tokens for the phrase utf8 string. * */ -bool pinyin_lookup_tokens(pinyin_instance_t * instance, +bool zhuyin_lookup_tokens(zhuyin_instance_t * instance, const char * phrase, GArray * tokenarray); /** - * pinyin_train: - * @instance: the pinyin instance. + * zhuyin_train: + * @instance: the zhuyin instance. * @returns: whether the sentence is trained. * * Train the current user input sentence. * */ -bool pinyin_train(pinyin_instance_t * instance); +bool zhuyin_train(zhuyin_instance_t * instance); /** - * pinyin_reset: - * @instance: the pinyin instance. - * @returns: whether the pinyin instance is resetted. + * zhuyin_reset: + * @instance: the zhuyin instance. + * @returns: whether the zhuyin instance is resetted. * - * Reset the pinyin instance. + * Reset the zhuyin instance. * */ -bool pinyin_reset(pinyin_instance_t * instance); +bool zhuyin_reset(zhuyin_instance_t * instance); /** - * pinyin_get_bopomofo_string: - * @instance: the pinyin instance. + * zhuyin_get_bopomofo_string: + * @instance: the zhuyin instance. * @key: the chewing key. * @utf8_str: the chewing string. * @returns: whether the get operation is successful. @@ -401,13 +401,13 @@ bool pinyin_reset(pinyin_instance_t * instance); * Get the chewing string of the key. * */ -bool pinyin_get_bopomofo_string(pinyin_instance_t * instance, +bool zhuyin_get_bopomofo_string(zhuyin_instance_t * instance, ChewingKey * key, gchar ** utf8_str); /** - * pinyin_get_pinyin_string: - * @instance: the pinyin instance. + * zhuyin_get_pinyin_string: + * @instance: the zhuyin instance. * @key: the pinyin key. * @utf8_str: the pinyin string. * @returns: whether the get operation is successful. @@ -415,13 +415,13 @@ bool pinyin_get_bopomofo_string(pinyin_instance_t * instance, * Get the pinyin string of the key. * */ -bool pinyin_get_pinyin_string(pinyin_instance_t * instance, +bool zhuyin_get_pinyin_string(zhuyin_instance_t * instance, ChewingKey * key, gchar ** utf8_str); /** - * pinyin_token_get_phrase: - * @instance: the pinyin instance. + * zhuyin_token_get_phrase: + * @instance: the zhuyin instance. * @token: the phrase token. * @len: the phrase length. * @utf8_str: the phrase string. @@ -430,14 +430,14 @@ bool pinyin_get_pinyin_string(pinyin_instance_t * instance, * Get the phrase length and utf8 string. * */ -bool pinyin_token_get_phrase(pinyin_instance_t * instance, +bool zhuyin_token_get_phrase(zhuyin_instance_t * instance, phrase_token_t token, guint * len, gchar ** utf8_str); /** - * pinyin_token_get_n_pronunciation: - * @instance: the pinyin instance. + * zhuyin_token_get_n_pronunciation: + * @instance: the zhuyin instance. * @token: the phrase token. * @num: the number of pinyins. * @returns: whether the get operation is successful. @@ -445,13 +445,13 @@ bool pinyin_token_get_phrase(pinyin_instance_t * instance, * Get the number of the pinyins. * */ -bool pinyin_token_get_n_pronunciation(pinyin_instance_t * instance, +bool zhuyin_token_get_n_pronunciation(zhuyin_instance_t * instance, phrase_token_t token, guint * num); /** - * pinyin_token_get_nth_pronunciation: - * @instance: the pinyin instance. + * zhuyin_token_get_nth_pronunciation: + * @instance: the zhuyin instance. * @token: the phrase token. * @nth: the index of the pinyin. * @keys: the GArray of chewing key. @@ -460,14 +460,14 @@ bool pinyin_token_get_n_pronunciation(pinyin_instance_t * instance, * Get the nth pinyin from the phrase. * */ -bool pinyin_token_get_nth_pronunciation(pinyin_instance_t * instance, +bool zhuyin_token_get_nth_pronunciation(zhuyin_instance_t * instance, phrase_token_t token, guint nth, ChewingKeyVector keys); /** - * pinyin_token_get_unigram_frequency: - * @instance: the pinyin instance. + * zhuyin_token_get_unigram_frequency: + * @instance: the zhuyin instance. * @token: the phrase token. * @freq: the unigram frequency of the phrase. * @returns: whether the get operation is successful. @@ -475,13 +475,13 @@ bool pinyin_token_get_nth_pronunciation(pinyin_instance_t * instance, * Get the unigram frequency of the phrase. * */ -bool pinyin_token_get_unigram_frequency(pinyin_instance_t * instance, +bool zhuyin_token_get_unigram_frequency(zhuyin_instance_t * instance, phrase_token_t token, guint * freq); /** - * pinyin_token_add_unigram_frequency: - * @instance: the pinyin instance. + * zhuyin_token_add_unigram_frequency: + * @instance: the zhuyin instance. * @token: the phrase token. * @delta: the delta of the unigram frequency. * @returns: whether the add operation is successful. @@ -489,38 +489,38 @@ bool pinyin_token_get_unigram_frequency(pinyin_instance_t * instance, * Add delta to the unigram frequency of the phrase token. * */ -bool pinyin_token_add_unigram_frequency(pinyin_instance_t * instance, +bool zhuyin_token_add_unigram_frequency(zhuyin_instance_t * instance, phrase_token_t token, guint delta); /** - * pinyin_get_n_candidate: - * @instance: the pinyin instance. + * zhuyin_get_n_candidate: + * @instance: the zhuyin instance. * @num: the number of the candidates. * @returns: whether the get operation is successful. * * Get the number of the candidates. * */ -bool pinyin_get_n_candidate(pinyin_instance_t * instance, +bool zhuyin_get_n_candidate(zhuyin_instance_t * instance, guint * num); /** - * pinyin_get_candidate: - * @instance: the pinyin instance. + * zhuyin_get_candidate: + * @instance: the zhuyin instance. * @index: the index of the candidate. * @candidate: the retrieved candidate. * * Get the candidate of the index from the candidates. * */ -bool pinyin_get_candidate(pinyin_instance_t * instance, +bool zhuyin_get_candidate(zhuyin_instance_t * instance, guint index, lookup_candidate_t ** candidate); /** - * pinyin_get_candidate_type: - * @instance: the pinyin instance. + * zhuyin_get_candidate_type: + * @instance: the zhuyin instance. * @candidate: the lookup candidate. * @type: the type of the candidate. * @returns: whether the get operation is successful. @@ -528,13 +528,13 @@ bool pinyin_get_candidate(pinyin_instance_t * instance, * Get the type of the lookup candidate. * */ -bool pinyin_get_candidate_type(pinyin_instance_t * instance, +bool zhuyin_get_candidate_type(zhuyin_instance_t * instance, lookup_candidate_t * candidate, lookup_candidate_type_t * type); /** - * pinyin_get_candidate_string: - * @instance: the pinyin instance. + * zhuyin_get_candidate_string: + * @instance: the zhuyin instance. * @candidate: the lookup candidate. * @utf8_str: the string of the candidate. * @returns: whether the get operation is successful. @@ -542,25 +542,25 @@ bool pinyin_get_candidate_type(pinyin_instance_t * instance, * Get the string of the candidate. * */ -bool pinyin_get_candidate_string(pinyin_instance_t * instance, +bool zhuyin_get_candidate_string(zhuyin_instance_t * instance, lookup_candidate_t * candidate, const gchar ** utf8_str); /** - * pinyin_get_n_pinyin: - * @instance: the pinyin instance. + * zhuyin_get_n_pinyin: + * @instance: the zhuyin instance. * @num: the number of the pinyins. * @returns: whether the get operation is successful. * * Get the number of the pinyins. * */ -bool pinyin_get_n_pinyin(pinyin_instance_t * instance, +bool zhuyin_get_n_pinyin(zhuyin_instance_t * instance, guint * num); /** - * pinyin_get_pinyin_key: - * @instance: the pinyin instance. + * zhuyin_get_pinyin_key: + * @instance: the zhuyin instance. * @index: the index of the pinyin key. * @key: the retrieved pinyin key. * @returns: whether the get operation is successful. @@ -568,12 +568,12 @@ bool pinyin_get_n_pinyin(pinyin_instance_t * instance, * Get the pinyin key of the index from the pinyin keys. * */ -bool pinyin_get_pinyin_key(pinyin_instance_t * instance, +bool zhuyin_get_pinyin_key(zhuyin_instance_t * instance, guint index, ChewingKey ** key); /** - * pinyin_get_pinyin_key_rest: + * zhuyin_get_pinyin_key_rest: * @instance: the pinyin index. * @index: the index of the pinyin key rest. * @key_rest: the retrieved pinyin key rest. @@ -582,13 +582,13 @@ bool pinyin_get_pinyin_key(pinyin_instance_t * instance, * Get the pinyin key rest of the index from the pinyin key rests. * */ -bool pinyin_get_pinyin_key_rest(pinyin_instance_t * instance, +bool zhuyin_get_pinyin_key_rest(zhuyin_instance_t * instance, guint index, ChewingKeyRest ** key_rest); /** - * pinyin_get_pinyin_key_rest_positions: - * @instance: the pinyin instance. + * zhuyin_get_pinyin_key_rest_positions: + * @instance: the zhuyin instance. * @key_rest: the pinyin key rest. * @begin: the begin position of the corresponding pinyin key. * @end: the end position of the corresponding pinyin key. @@ -597,13 +597,13 @@ bool pinyin_get_pinyin_key_rest(pinyin_instance_t * instance, * Get the positions of the pinyin key rest. * */ -bool pinyin_get_pinyin_key_rest_positions(pinyin_instance_t * instance, +bool zhuyin_get_pinyin_key_rest_positions(zhuyin_instance_t * instance, ChewingKeyRest * key_rest, guint16 * begin, guint16 * end); /** - * pinyin_get_pinyin_key_rest_length: - * @instance: the pinyin instance. + * zhuyin_get_pinyin_key_rest_length: + * @instance: the zhuyin instance. * @key_rest: the pinyin key rest. * @length: the length of the corresponding pinyin key. * @returns: whether the get operation is successful. @@ -611,37 +611,37 @@ bool pinyin_get_pinyin_key_rest_positions(pinyin_instance_t * instance, * Get the length of the corresponding pinyin key. * */ -bool pinyin_get_pinyin_key_rest_length(pinyin_instance_t * instance, +bool zhuyin_get_pinyin_key_rest_length(zhuyin_instance_t * instance, ChewingKeyRest * key_rest, guint16 * length); /** - * pinyin_get_raw_full_pinyin: - * @instance: the pinyin instance. + * zhuyin_get_raw_full_pinyin: + * @instance: the zhuyin instance. * @utf8_str: the modified raw full pinyin after choose candidate. * @returns: whether the get operation is successful. * * Get the modified raw full pinyin after choose candidate. * */ -bool pinyin_get_raw_full_pinyin(pinyin_instance_t * instance, +bool zhuyin_get_raw_full_pinyin(zhuyin_instance_t * instance, const gchar ** utf8_str); /** - * pinyin_get_n_phrase: - * @instance: the pinyin instance. + * zhuyin_get_n_phrase: + * @instance: the zhuyin instance. * @num: the number of the phrase tokens. * @returns: whether the get operation is successful. * * Get the number of the phrase tokens. * */ -bool pinyin_get_n_phrase(pinyin_instance_t * instance, +bool zhuyin_get_n_phrase(zhuyin_instance_t * instance, guint * num); /** - * pinyin_get_phrase_token: - * @instance: the pinyin instance. + * zhuyin_get_phrase_token: + * @instance: the zhuyin instance. * @index: the index of the phrase token. * @token: the retrieved phrase token. * @returns: whether the get operation is successful. @@ -649,7 +649,7 @@ bool pinyin_get_n_phrase(pinyin_instance_t * instance, * Get the phrase token of the index from the phrase tokens. * */ -bool pinyin_get_phrase_token(pinyin_instance_t * instance, +bool zhuyin_get_phrase_token(zhuyin_instance_t * instance, guint index, phrase_token_t * token); -- cgit