Commit ·
9e8a881
1
Parent(s): dac07ac
cleanup
Browse files
main.py
DELETED
|
@@ -1,18 +0,0 @@
|
|
| 1 |
-
import pandas as pd
|
| 2 |
-
|
| 3 |
-
# Load the data
|
| 4 |
-
data = pd.read_excel('corpus.xlsx')
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
def clean_text(text):
|
| 8 |
-
text = '\n'.join(line.rstrip() for line in text.split("\n"))
|
| 9 |
-
text = text.rstrip()
|
| 10 |
-
return text
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
data['original'] = data['original'].apply(clean_text)
|
| 14 |
-
data['human1'] = data['human1'].apply(clean_text)
|
| 15 |
-
data['human2'] = data['human2'].apply(clean_text)
|
| 16 |
-
|
| 17 |
-
# Save the data
|
| 18 |
-
data.to_excel('cleaned_corpus.xlsx', index=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|