1
0
Fork 0

Merge branch 'Bug529-GuHan' of http://121.4.94.30:3000/mrlan/EnglishPal into Alpha-snapshot20230601

Alpha-snapshot20230601
Hui Lan 2023-06-01 07:40:27 +08:00
commit b22c654f0f
1 changed files with 1 additions and 1 deletions

View File

@ -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('--', ' ')