From baa1c45782cfe1dbc0813863d4e47076daeaab4e Mon Sep 17 00:00:00 2001 From: whiost Date: Thu, 8 Dec 2022 16:03:38 +0800 Subject: [PATCH] =?UTF-8?q?[Bugfix]=20=E9=83=A8=E5=88=86=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E7=AC=A6=E5=8F=B7=E4=B8=8D=E4=BC=9A=E8=A2=AB=E5=88=86=E9=9A=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/wordfreqCMD.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/wordfreqCMD.py b/app/wordfreqCMD.py index 9ee7e56..342cd2c 100644 --- a/app/wordfreqCMD.py +++ b/app/wordfreqCMD.py @@ -39,7 +39,7 @@ def file2str(fname):#文件转字符 def remove_punctuation(s): # 这里是s是形参 (parameter)。函数被调用时才给s赋值。 - special_characters = '_©~=+[]*&$%^@.,?!:;#()"“”—‘’' # 把里面的字符都去掉 + special_characters = '_©~=+[]*&$%^@.,?!:;#()"“”—‘’|;...' # 把里面的字符都去掉 for c in special_characters: s = s.replace(c, ' ') # 防止出现把 apple,apple 移掉逗号后变成 appleapple 情况 s = s.replace('--', ' ')