diff options
author | Peng Wu <alexepico@gmail.com> | 2011-11-09 09:25:18 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2011-11-09 09:25:18 +0800 |
commit | 083a9fb6a32b1750c0924baf8cee550d75da64c3 (patch) | |
tree | 78798fc83d3af14e6ab8824b411066fb4b8b70ad /scripts/genspecialtable.py | |
parent | 2980b45009e45b12fe233d945fea1be3275de26d (diff) | |
download | libpinyin-083a9fb6a32b1750c0924baf8cee550d75da64c3.tar.gz libpinyin-083a9fb6a32b1750c0924baf8cee550d75da64c3.tar.xz libpinyin-083a9fb6a32b1750c0924baf8cee550d75da64c3.zip |
refine python code
Diffstat (limited to 'scripts/genspecialtable.py')
-rw-r--r-- | scripts/genspecialtable.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/scripts/genspecialtable.py b/scripts/genspecialtable.py index 9abe0e4..0ef9d44 100644 --- a/scripts/genspecialtable.py +++ b/scripts/genspecialtable.py @@ -83,15 +83,14 @@ def gen_resplit_table(): return ',\n'.join(entries) -### main function ### -if __name__ == "__main__": - load_phrase("pinyin2.txt") +#init code, load lists +divided_list = filter_divided() +resplit_list = filter_resplit() +sort_all() - #load lists - divided_list = filter_divided() - resplit_list = filter_resplit() - sort_all() +### main function ### +if __name__ == "__main__": s = gen_divided_table() + '\n' + gen_resplit_table() print(s) |