diff options
author | Peng Wu <alexepico@gmail.com> | 2012-12-04 11:05:33 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2012-12-04 11:05:33 +0800 |
commit | fdefa16aae400be58033fa0be6daa0b9beeb0492 (patch) | |
tree | cb2c6fc769bfdae944fbebe125f347cacd11b954 /src/pinyin.h | |
parent | 01b200662b3706c071658103c1cc73ea307d685f (diff) | |
download | libpinyin-fdefa16aae400be58033fa0be6daa0b9beeb0492.tar.gz libpinyin-fdefa16aae400be58033fa0be6daa0b9beeb0492.tar.xz libpinyin-fdefa16aae400be58033fa0be6daa0b9beeb0492.zip |
write pinyin_token_*
Diffstat (limited to 'src/pinyin.h')
-rw-r--r-- | src/pinyin.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/pinyin.h b/src/pinyin.h index 03f391f..735dbfb 100644 --- a/src/pinyin.h +++ b/src/pinyin.h @@ -541,6 +541,30 @@ bool pinyin_get_pinyin_string(pinyin_instance_t * instance, ChewingKey * key, gchar ** utf8_str); +bool pinyin_token_get_phrase(pinyin_instance_t * instance, + phrase_token_t token, + guint * len, + gchar ** utf8_str); + +bool pinyin_token_get_n_pronunciation(pinyin_instance_t * instance, + phrase_token_t token, + guint * num); + +bool pinyin_token_get_nth_pronunciation(pinyin_instance_t * instance, + phrase_token_t token, + guint nth, + ChewingKeyVector keys); + +bool pinyin_token_get_unigram_frequency(pinyin_instance_t * instance, + phrase_token_t token, + guint * freq); + +bool pinyin_token_add_unigram_frequency(pinyin_instance_t * instance, + phrase_token_t token, + guint delta); + + + /* hack here. */ typedef ChewingKey PinyinKey; typedef ChewingKeyRest PinyinKeyPos; |