diff options
author | Peng Wu <alexepico@gmail.com> | 2011-12-13 17:21:38 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2011-12-13 17:21:38 +0800 |
commit | b9dae484fb1119b89bb722f4f1ecb373b8e4cf52 (patch) | |
tree | 73a3d0ef12fbfcd08fb1800300a4cd05b20b7991 /scripts | |
parent | 4d43f63b30bcb97b7e0f3761df5c7902d4575bc5 (diff) | |
download | libpinyin-b9dae484fb1119b89bb722f4f1ecb373b8e4cf52.tar.gz libpinyin-b9dae484fb1119b89bb722f4f1ecb373b8e4cf52.tar.xz libpinyin-b9dae484fb1119b89bb722f4f1ecb373b8e4cf52.zip |
fixes python scripts
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/genpinyinheader.py | 4 | ||||
-rw-r--r-- | scripts/genpinyintable.py | 4 | ||||
-rw-r--r-- | scripts/pinyin_parser_table.h.in | 15 |
3 files changed, 19 insertions, 4 deletions
diff --git a/scripts/genpinyinheader.py b/scripts/genpinyinheader.py index defe018..8a0a8fd 100644 --- a/scripts/genpinyinheader.py +++ b/scripts/genpinyinheader.py @@ -23,7 +23,7 @@ import os from genpinyintable import gen_content_table, \ gen_pinyin_index, gen_bopomofo_index, \ - gen_chewing_key_to_table_index + gen_chewing_key_table from genspecialtable import gen_divided_table, gen_resplit_table def get_table_content(tablename): @@ -38,7 +38,7 @@ def get_table_content(tablename): if tablename == 'RESPLIT_TABLE': return gen_resplit_table() if tablename == 'TABLE_INDEX': - return gen_chewing_key_to_table_index() + return gen_chewing_key_table() def expand_file(filename): diff --git a/scripts/genpinyintable.py b/scripts/genpinyintable.py index 4f4e64f..c0f91c6 100644 --- a/scripts/genpinyintable.py +++ b/scripts/genpinyintable.py @@ -84,7 +84,7 @@ def gen_bopomofo_index(): return ',\n'.join(entries) -def gen_chewing_key_table_index_map(): +def gen_chewing_key_table(): return gen_table_index(content_table) @@ -96,5 +96,5 @@ sort_all() ### main function ### if __name__ == "__main__": #s = gen_content_table() + gen_pinyin_index() + gen_bopomofo_index() - s = gen_chewing_key_table_index_map() + s = gen_chewing_key_table() print(s) diff --git a/scripts/pinyin_parser_table.h.in b/scripts/pinyin_parser_table.h.in index ae8093d..6a9bccb 100644 --- a/scripts/pinyin_parser_table.h.in +++ b/scripts/pinyin_parser_table.h.in @@ -26,6 +26,21 @@ const resplit_table_item_t resplit_table[] = { @RESPLIT_TABLE@ }; +const gint chewing_key_table[CHEWING_NUMBER_OF_INITIALS * + CHEWING_NUMBER_OF_MIDDLES * + CHEWING_NUMBER_OF_FINALS] = { +@TABLE_INDEX@ +}; + +const char * chewing_tone_table[CHEWING_NUMBER_OF_TONES] = { +"", +"ˉ", +'ˊ', +'ˇ', +'ˋ', +'˙' +}; + }; #endif |