summaryrefslogtreecommitdiffstats
path: root/src/storage/pinyin_parser2.h
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-08-15 13:32:28 +0800
committerPeng Wu <alexepico@gmail.com>2013-08-15 14:00:26 +0800
commit85bcb959f4500bacbbe43bafd857b66a0abc99e7 (patch)
tree775c6f8366d9b22c1c251bb7f218eff8200634d4 /src/storage/pinyin_parser2.h
parentcc24a45b4034d3bc4bee45439c6205bf4c70d437 (diff)
downloadlibzhuyin-85bcb959f4500bacbbe43bafd857b66a0abc99e7.tar.gz
libzhuyin-85bcb959f4500bacbbe43bafd857b66a0abc99e7.tar.xz
libzhuyin-85bcb959f4500bacbbe43bafd857b66a0abc99e7.zip
support more pinyins
Diffstat (limited to 'src/storage/pinyin_parser2.h')
-rw-r--r--src/storage/pinyin_parser2.h27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/storage/pinyin_parser2.h b/src/storage/pinyin_parser2.h
index feee45b..b402523 100644
--- a/src/storage/pinyin_parser2.h
+++ b/src/storage/pinyin_parser2.h
@@ -30,8 +30,10 @@
namespace pinyin{
typedef struct {
- const char * m_pinyin_str;
- const char * m_chewing_str;
+ const char * m_hanyu_pinyin;
+ const char * m_bopomofo;
+ const char * m_luoma_pinyin;
+ const char * m_secondary_bopomofo;
ChewingKey m_chewing_key;
} content_table_item_t;
@@ -48,20 +50,6 @@ typedef struct {
} chewing_index_item_t;
typedef struct {
- const char * m_orig_key;
- guint32 m_orig_freq;
- const char * m_new_keys[2];
- guint32 m_new_freq;
-} divided_table_item_t;
-
-typedef struct {
- const char * m_orig_keys[2];
- guint32 m_orig_freq;
- const char * m_new_keys[2];
- guint32 m_new_freq;
-} resplit_table_item_t;
-
-typedef struct {
const char * m_shengmu;
} double_pinyin_scheme_shengmu_item_t;
@@ -90,6 +78,10 @@ typedef GArray * ParseValueVector;
*/
class PinyinParser2
{
+protected:
+ const pinyin_index_item_t * m_pinyin_index;
+ size_t m_pinyin_index_len;
+
public:
/**
* PinyinParser2::~PinyinParser2:
@@ -161,6 +153,9 @@ public:
* the parse method will use dynamic programming to drive parse_one_key.
*/
virtual int parse(pinyin_option_t options, ChewingKeyVector & keys, ChewingKeyRestVector & key_rests, const char *str, int len) const;
+
+public:
+ bool set_scheme(PinyinScheme scheme);
};
/**