Update app.py
Browse files小修正。處理掉開頭有「犯罪事實:」的字串。
app.py
CHANGED
@@ -11,7 +11,7 @@ def remove_space(example):
|
|
11 |
移除資料集當中「犯罪事實」欄 (Corpus-Delicti) 當中作為斷詞字元的空白字元,以及每句開頭的「ㄧ、」。
|
12 |
並且在文章的開頭跟結尾加入 bos_token = '<s>', eos_token = '</s>'
|
13 |
'''
|
14 |
-
return {'Corpus-Delicti': example['Corpus-Delicti'].replace(" ", "").split('一、')[1]}
|
15 |
|
16 |
def download_file(content, filename):
|
17 |
with open(filename, "w", encoding="utf-8") as f:
|
|
|
11 |
移除資料集當中「犯罪事實」欄 (Corpus-Delicti) 當中作為斷詞字元的空白字元,以及每句開頭的「ㄧ、」。
|
12 |
並且在文章的開頭跟結尾加入 bos_token = '<s>', eos_token = '</s>'
|
13 |
'''
|
14 |
+
return {'Corpus-Delicti': example['Corpus-Delicti'].replace(" ", "").split('一、')[1].replace('犯罪事實:', '')}
|
15 |
|
16 |
def download_file(content, filename):
|
17 |
with open(filename, "w", encoding="utf-8") as f:
|