diff options
author | Peng Wu <alexepico@gmail.com> | 2011-12-05 11:55:58 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2011-12-05 11:55:58 +0800 |
commit | 2a3f9b829c85ab8e26b13e9db3824863bb865e69 (patch) | |
tree | ad0bdebd378248a7d32fef38998da2b3183d2f8e | |
parent | e2a8959307e801a1821caa28d5217a9833e6e907 (diff) | |
download | libpinyin-2a3f9b829c85ab8e26b13e9db3824863bb865e69.tar.gz libpinyin-2a3f9b829c85ab8e26b13e9db3824863bb865e69.tar.xz libpinyin-2a3f9b829c85ab8e26b13e9db3824863bb865e69.zip |
fixes genbopomofoheader.py
-rw-r--r-- | scripts/genbopomofoheader.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/genbopomofoheader.py b/scripts/genbopomofoheader.py index a609589..9d617b6 100644 --- a/scripts/genbopomofoheader.py +++ b/scripts/genbopomofoheader.py @@ -31,11 +31,11 @@ bopomofo = [ 'ㄧ', 'ㄨ', 'ㄩ', 'ㄚ', 'ㄛ', 'ㄜ', 'ㄝ', 'ㄞ', 'ㄟ', 'ㄠ', 'ㄡ', 'ㄢ', 'ㄣ', 'ㄤ', 'ㄥ', 'ㄦ', - 'ˊ', 'ˇ', 'ˋ', '˙', + 'ˉ', 'ˊ', 'ˇ', 'ˋ', '˙', ] -#陰平聲不標號 -num_tones = -4 +#陰平聲不標號, use space key +num_tones = -5 bopomofo_keyboards = { #標準注音鍵盤 @@ -43,28 +43,28 @@ bopomofo_keyboards = { ( "1","q","a","z","2","w","s","x","e","d","c","r","f","v","5","t","g","b","y","h","n", "u","j","m","8","i","k",",","9","o","l",".","0","p",";","/","-", - "6","3","4","7", + " ","6","3","4","7", ), #精業注音鍵盤 'GINYIEH': ( "2","w","s","x","3","e","d","c","r","f","v","t","g","b","6","y","h","n","u","j","m", "-","[","'","8","i","k",",","9","o","l",".","0","p",";","/","=", - "q","a","z","1", + " ","q","a","z","1", ), #倚天注音鍵盤 'ETEN': ( "b","p","m","f","d","t","n","l","v","k","h","g","7","c",",",".","/","j",";","'","s", "e","x","u","a","o","r","w","i","q","z","y","8","9","0","-","=", - "2","3","4","1", + " ","2","3","4","1", ), #IBM注音鍵盤 'IBM': ( "1","2","3","4","5","6","7","8","9","0","-","q","w","e","r","t","y","u","i","o","p", "a","s","d","f","g","h","j","k","l",";","z","x","c","v","b","n", - "m",",",".","/", + " ","m",",",".","/", ), } @@ -98,7 +98,7 @@ def gen_chewing_tones(scheme): keyboard = bopomofo_keyboards[scheme] keyboard = keyboard[num_tones:] items = [] - for (i, key) in enumerate(keyboard, start=2): + for (i, key) in enumerate(keyboard, start=1): items.append((key, i)); items = sorted(items, key=itemgetter(0)) entries = [] |