summaryrefslogtreecommitdiffstats
path: root/scripts/genpinyintable.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/genpinyintable.py')
-rw-r--r--scripts/genpinyintable.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/genpinyintable.py b/scripts/genpinyintable.py
index 27b047f..68ee239 100644
--- a/scripts/genpinyintable.py
+++ b/scripts/genpinyintable.py
@@ -22,6 +22,7 @@
import operator
from bopomofo import BOPOMOFO_HANYU_PINYIN_MAP, BOPOMOFO_LUOMA_PINYIN_MAP, BOPOMOFO_SECONDARY_BOPOMOFO_MAP
from pinyintable import *
+from correct import *
from chewingkey import gen_table_index
@@ -138,6 +139,13 @@ def gen_secondary_bopomofo_index():
entries.append(entry)
return ',\n'.join(entries)
+def check_rule(correct, wrong):
+ if '*' not in correct:
+ assert '*' not in wrong
+ elif correct.endswith('*'):
+ assert wrong.endswith('*')
+ return True
+
def gen_chewing_key_table():
return gen_table_index(content_table)