Spaces:
Runtime error
Runtime error
peter szemraj
commited on
Commit
·
ebe69d1
1
Parent(s):
39f9011
add additional entities
Browse files
utils.py
CHANGED
|
@@ -13,11 +13,16 @@ def postprocess(text:str):
|
|
| 13 |
replacements = {
|
| 14 |
"ENA":"<COMPANY>",
|
| 15 |
"Enron":"<COMPANY>",
|
|
|
|
|
|
|
|
|
|
| 16 |
"Sony":"<COMPANY>",
|
| 17 |
"Columbia":"<COMPANY>",
|
| 18 |
-
"
|
| 19 |
"Clinton":"Smith",
|
| 20 |
"Amy":"Jane",
|
|
|
|
|
|
|
| 21 |
"Pascal":"<PERSON>",
|
| 22 |
}
|
| 23 |
|
|
@@ -26,6 +31,5 @@ def postprocess(text:str):
|
|
| 26 |
text = text.replace(k, v)
|
| 27 |
text = text.replace(k.lower(), v)
|
| 28 |
|
| 29 |
-
|
| 30 |
return text
|
| 31 |
|
|
|
|
| 13 |
replacements = {
|
| 14 |
"ENA":"<COMPANY>",
|
| 15 |
"Enron":"<COMPANY>",
|
| 16 |
+
"Enron Corporation":"<COMPANY>",
|
| 17 |
+
"Sony Pictures Entertainment":"<COMPANY>",
|
| 18 |
+
"Columbia Pictures":"<COMPANY>",
|
| 19 |
"Sony":"<COMPANY>",
|
| 20 |
"Columbia":"<COMPANY>",
|
| 21 |
+
"Hillary":"Jane",
|
| 22 |
"Clinton":"Smith",
|
| 23 |
"Amy":"Jane",
|
| 24 |
+
"Sara":"Jane",
|
| 25 |
+
"Harambe":"Jane",
|
| 26 |
"Pascal":"<PERSON>",
|
| 27 |
}
|
| 28 |
|
|
|
|
| 31 |
text = text.replace(k, v)
|
| 32 |
text = text.replace(k.lower(), v)
|
| 33 |
|
|
|
|
| 34 |
return text
|
| 35 |
|