From 520920c35ccbac3bfdca0aa76a0859a6edd8d528 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Wed, 9 Nov 2011 15:15:07 +0800 Subject: fixes load_phrase --- scripts/specialtable.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/specialtable.py') diff --git a/scripts/specialtable.py b/scripts/specialtable.py index a71aed7..9f03904 100644 --- a/scripts/specialtable.py +++ b/scripts/specialtable.py @@ -50,6 +50,8 @@ def load_phrase(filename): second_key = second_key[:-1] phrase_dict[(first_key, second_key)] = freq else: + if pinyin_str[-1].isdigit(): + pinyin_str = pinyin_str[:-1] phrase_dict[pinyin_str] = freq phrasefile.close() -- cgit