diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/bopomofo.py | 1 | ||||
-rw-r--r-- | scripts/genpytable.py | 12 |
2 files changed, 10 insertions, 3 deletions
diff --git a/scripts/bopomofo.py b/scripts/bopomofo.py index dd53ea1..bd0f448 100644 --- a/scripts/bopomofo.py +++ b/scripts/bopomofo.py @@ -3,7 +3,6 @@ # # libpinyin - Library to deal with pinyin. # -# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com> # Copyright (c) 2010 BYVoid <byvoid1@gmail.com> # Copyright (C) 2011 Peng Wu <alexepico@gmail.com> # diff --git a/scripts/genpytable.py b/scripts/genpytable.py index 31ce8ca..1b339c2 100644 --- a/scripts/genpytable.py +++ b/scripts/genpytable.py @@ -3,7 +3,6 @@ # # libpinyin - Library to deal with pinyin. # -# Copyright (c) 2007-2008 Peng Huang <shawn.p.huang@gmail.com> # Copyright (C) 2011 Peng Wu <alexepico@gmail.com> # # This program is free software; you can redistribute it and/or modify @@ -33,6 +32,14 @@ def check_pinyin_chewing_map(): else: print("pinyin %s has no chewing mapping", pinyin_key) +''' + for pinyin_key in bopomofo.PINYIN_BOPOMOFO_MAP.keys(): + if pinyin_key in pinyin.PINYIN_DICT.keys(): + pass + else: + print(pinyin_key, get_chewing(pinyin_key)) +''' + def get_chewing(pinyin_key): initial, middle, final = \ 'CHEWING_ZERO_INITIAL', 'CHEWING_ZERO_MIDDLE', 'CHEWING_ZERO_FINAL' @@ -83,6 +90,7 @@ def get_chewing(pinyin_key): if __name__ == "__main__": #pre-check here check_pinyin_chewing_map() + #dump - for pinyin_key in sorted(pinyin.PINYIN_DICT.keys()): + for pinyin_key in sorted(bopomofo.PINYIN_BOPOMOFO_MAP.keys()): print (pinyin_key, get_chewing(pinyin_key)) |