diff options
Diffstat (limited to 'src/storage')
| -rw-r--r-- | src/storage/pinyin_parser2.cpp | 6 | ||||
| -rw-r--r-- | src/storage/pinyin_parser2.h | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp index 9425b6f..f22f4ba 100644 --- a/src/storage/pinyin_parser2.cpp +++ b/src/storage/pinyin_parser2.cpp @@ -457,17 +457,15 @@ bool FullPinyinParser2::post_process2(pinyin_option_t options, continue; /* do re-split */ - const char * onepinyin = str + cur_rest->m_raw_begin; size_t len = strlen(item->m_new_keys[0]); - assert(parse_one_key(options, *cur_key, onepinyin, len)); + *cur_key = item->m_new_structs[0]; cur_rest->m_raw_end = cur_rest->m_raw_begin + len; next_rest->m_raw_begin = cur_rest->m_raw_end; - onepinyin = str + next_rest->m_raw_begin; len = strlen(item->m_new_keys[1]); - assert(parse_one_key(options, *next_key, onepinyin, len)); + *next_key = item->m_new_structs[1]; } /* restore tones */ diff --git a/src/storage/pinyin_parser2.h b/src/storage/pinyin_parser2.h index b8d1d9b..53202ff 100644 --- a/src/storage/pinyin_parser2.h +++ b/src/storage/pinyin_parser2.h @@ -53,15 +53,19 @@ typedef struct { typedef struct { const char * m_orig_key; + ChewingKey m_orig_struct; guint32 m_orig_freq; const char * m_new_keys[2]; + ChewingKey m_new_structs[2]; guint32 m_new_freq; } divided_table_item_t; typedef struct { const char * m_orig_keys[2]; + ChewingKey m_orig_structs[2]; guint32 m_orig_freq; const char * m_new_keys[2]; + ChewingKey m_new_structs[2]; guint32 m_new_freq; } resplit_table_item_t; |
