From 1f2bafab941a38307b78fb2236e7aee74b8f0f89 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 28 Dec 2017 10:58:56 +0800 Subject: update scripts2 for valid zhuyin table --- scripts2/zhuyin.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts2/zhuyin.py') diff --git a/scripts2/zhuyin.py b/scripts2/zhuyin.py index 5ab76c4..fa5dbd9 100644 --- a/scripts2/zhuyin.py +++ b/scripts2/zhuyin.py @@ -65,6 +65,7 @@ def compute_zero_tone(): final_maps = middle_maps[middle] for final in final_maps.keys(): tone_maps = final_maps[final] + # assume all valid zero tones have sub tones if len(tone_maps) > 0: tone_maps["CHEWING_ZERO_TONE"] = True @@ -95,6 +96,8 @@ def is_valid_zhuyin(key): if tone not in maps: return False + return True + # generate valid_zhuyin_table def gen_zhuyin_table(): -- cgit