diff options
author | Peng Wu <alexepico@gmail.com> | 2011-12-14 14:23:15 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2011-12-14 14:23:15 +0800 |
commit | b2f0a76e79eb8cc05adf31c36a70bc82c8b1f03d (patch) | |
tree | 799cddc269191c36ff34af83908d570eb9e4c3f8 /src/storage/pinyin_parser2.h | |
parent | 20cef0cea7407e95daedc36c612dfcfa8339b48d (diff) | |
download | libpinyin-b2f0a76e79eb8cc05adf31c36a70bc82c8b1f03d.tar.gz libpinyin-b2f0a76e79eb8cc05adf31c36a70bc82c8b1f03d.tar.xz libpinyin-b2f0a76e79eb8cc05adf31c36a70bc82c8b1f03d.zip |
refine parse_one_key method
Diffstat (limited to 'src/storage/pinyin_parser2.h')
-rw-r--r-- | src/storage/pinyin_parser2.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/storage/pinyin_parser2.h b/src/storage/pinyin_parser2.h index 04bbffc..9988889 100644 --- a/src/storage/pinyin_parser2.h +++ b/src/storage/pinyin_parser2.h @@ -105,7 +105,7 @@ public: * * @return whether the entire string is parsed as one key. */ - virtual bool parse_one_key(pinyin_option_t options, ChewingKey & key, ChewingKeyRest & key_rest, const char *str, int len) const = 0; + virtual bool parse_one_key(pinyin_option_t options, ChewingKey & key, const char *str, int len) const = 0; /** * @brief Translate the source string into a set of ChewingKeys. @@ -117,9 +117,6 @@ public: * * @return the number of chars were actually used. */ - /* Note: - * 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 = 0; }; @@ -147,8 +144,11 @@ public: g_array_free(m_parse_steps, TRUE); } - virtual bool parse_one_key(pinyin_option_t options, ChewingKey & key, ChewingKeyRest & key_rest, const char *str, int len) const; + virtual bool parse_one_key(pinyin_option_t options, ChewingKey & key, const char *str, int len) const; + /* Note: + * 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; }; @@ -170,7 +170,7 @@ public: virtual ~DoublePinyinParser2() {} - virtual bool parse_one_key(pinyin_option_t options, ChewingKey & key, ChewingKeyRest & key_rest, const char *str, int len) const; + virtual bool parse_one_key(pinyin_option_t options, ChewingKey & key, const char *str, int len) const; virtual int parse(pinyin_option_t options, ChewingKeyVector & keys, ChewingKeyRestVector & key_rests, const char *str, int len) const; @@ -207,7 +207,7 @@ public: virtual ~ChewingParser2() {} - virtual bool parse_one_key(pinyin_option_t options, ChewingKey & key, ChewingKeyRest & key_rest, const char *str, int len) const; + virtual bool parse_one_key(pinyin_option_t options, ChewingKey & key, const char *str, int len) const; virtual int parse(pinyin_option_t options, ChewingKeyVector & keys, ChewingKeyRestVector & key_rests, const char *str, int len) const; |