ferdmartin commited on
Commit
a7c0739
·
1 Parent(s): 6db0368

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -36,8 +36,14 @@ 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
- pattern = r"\b[A-Za-z]+\d+\b"
40
- text = re.sub(pattern, "", text)
 
 
 
 
 
 
41
 
42
  return text.replace("REDACTED", "").lower().replace("[Name]", "").replace("[your name]", "").\
43
  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
+ # pattern = r"\b[A-Za-z]+\d+\b"
40
+ # text = re.sub(pattern, "", text)
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("[Name]", "").replace("[your name]", "").\
49
  replace("dear admissions committee,", "").replace("sincerely,","").\