diff options
-rw-r--r-- | src/libpinyin.ver | 1 | ||||
-rw-r--r-- | src/pinyin.cpp | 6 | ||||
-rw-r--r-- | src/pinyin.h | 12 | ||||
-rw-r--r-- | src/storage/pinyin_parser2.h | 1 |
4 files changed, 20 insertions, 0 deletions
diff --git a/src/libpinyin.ver b/src/libpinyin.ver index 40cd154..477b6e5 100644 --- a/src/libpinyin.ver +++ b/src/libpinyin.ver @@ -2,6 +2,7 @@ LIBPINYIN { global: pinyin_init; pinyin_save; + pinyin_set_full_pinyin_scheme; pinyin_set_double_pinyin_scheme; pinyin_set_chewing_scheme; pinyin_load_phrase_library; diff --git a/src/pinyin.cpp b/src/pinyin.cpp index 04911f8..f66a0c1 100644 --- a/src/pinyin.cpp +++ b/src/pinyin.cpp @@ -948,6 +948,12 @@ bool pinyin_save(pinyin_context_t * context){ return true; } +bool pinyin_set_full_pinyin_scheme(pinyin_context_t * context, + FullPinyinScheme scheme){ + context->m_full_pinyin_parser->set_scheme(scheme); + return true; +} + bool pinyin_set_double_pinyin_scheme(pinyin_context_t * context, DoublePinyinScheme scheme){ context->m_double_pinyin_parser->set_scheme(scheme); diff --git a/src/pinyin.h b/src/pinyin.h index adb2bb8..31c3bf5 100644 --- a/src/pinyin.h +++ b/src/pinyin.h @@ -204,6 +204,18 @@ void pinyin_end_get_phrases(export_iterator_t * iter); bool pinyin_save(pinyin_context_t * context); /** + * pinyin_set_full_pinyin_scheme: + * @context: the pinyin context. + * @scheme: the full pinyin scheme. + * @returns: whether the set full pinyin scheme succeeded. + * + * Change the full pinyin scheme of the pinyin context. + * + */ +bool pinyin_set_full_pinyin_scheme(pinyin_context_t * context, + FullPinyinScheme scheme); + +/** * pinyin_set_double_pinyin_scheme: * @context: the pinyin context. * @scheme: the double pinyin scheme. diff --git a/src/storage/pinyin_parser2.h b/src/storage/pinyin_parser2.h index 6faee17..b7d30ad 100644 --- a/src/storage/pinyin_parser2.h +++ b/src/storage/pinyin_parser2.h @@ -232,6 +232,7 @@ public: /* Direct Parser for Pinyin table load. */ class PinyinDirectParser2 : public PhoneticParser2 { + /* Only support Hanyu Pinyin now. */ const pinyin_index_item_t * m_pinyin_index; size_t m_pinyin_index_len; |