From 4e306346ec86fa8f0eef3ba9e7495615173f84eb Mon Sep 17 00:00:00 2001 From: Date: Tue, 6 Sep 2011 07:45:49 +0800 Subject: [PATCH] =?UTF-8?q?fig=20bug=20=E7=95=B6=E6=BC=A2=E5=AD=97?= =?UTF-8?q?=E6=8E=A5=E5=9C=A8=E5=BE=8C=E9=9D=A2=E6=99=82=EF=BC=8C=E5=81=B5?= =?UTF-8?q?=E6=B8=AC=E5=88=B0=E7=9A=84=20POJ=20=E5=87=BA=E7=8F=BE=E9=8C=AF?= =?UTF-8?q?=E8=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uiahoe.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/uiahoe.py b/uiahoe.py index ea82f81..a040a2f 100755 --- a/uiahoe.py +++ b/uiahoe.py @@ -78,12 +78,8 @@ orig_content = orig_content[1:] #刪除頭一個字(空白) '''處理調號''' -#i.e. punctuation_list,符合符號定義的字元 list。用 regexp 語法 -punctu_list = '([' + string.punctuation +\ - "、,。?!()「」『』《》〈〉【】〔〕;:…- \s" + '])' - #音節list(),包含符號、標點、其他文字 -syllable_list = re.split(punctu_list, orig_content) +syllable_list = re.split('([^a-zA-Z0-9]+)', orig_content) result = "" #輸出的結果(預設為空)