Spaces:
Sleeping
Sleeping
Commit
·
e71afca
1
Parent(s):
bef7a31
Update app.py
Browse files
app.py
CHANGED
@@ -36,14 +36,13 @@ def main():
|
|
36 |
text = nlp(text)
|
37 |
text = " ".join([token.text for token in text if token.ent_type_ not in ["PERSON", "DATE"]])
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
pattern1 = r"\b[A-Za-z]+\d+\b"
|
43 |
-
pattern2 = r'\[(.*?)\]'
|
44 |
|
45 |
text = re.sub(pattern1, "", text)
|
46 |
text = re.sub(pattern2, "", text)
|
|
|
47 |
|
48 |
return text.replace("REDACTED", "").lower().replace(" "," ").replace("[Name]", "").replace("[your name]", "").replace("\n your name", "").\
|
49 |
replace("dear admissions committee,", "").replace("sincerely,","").\
|
|
|
36 |
text = nlp(text)
|
37 |
text = " ".join([token.text for token in text if token.ent_type_ not in ["PERSON", "DATE"]])
|
38 |
|
39 |
+
pattern1 = r'f\d+'
|
40 |
+
pattern2 = r"\b[A-Za-z]+\d+\b"
|
41 |
+
pattern3 = r'\[(.*?)\]'
|
|
|
|
|
42 |
|
43 |
text = re.sub(pattern1, "", text)
|
44 |
text = re.sub(pattern2, "", text)
|
45 |
+
text = re.sub(pattern3, "", text)
|
46 |
|
47 |
return text.replace("REDACTED", "").lower().replace(" "," ").replace("[Name]", "").replace("[your name]", "").replace("\n your name", "").\
|
48 |
replace("dear admissions committee,", "").replace("sincerely,","").\
|