hexgrad commited on
Commit
bc777ff
·
verified ·
1 Parent(s): 679b29e

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -89,7 +89,7 @@ def normalize(text):
89
  text = re.sub(r'(?<=\d),(?=\d)', '', text)
90
  text = re.sub(r'(?<=\d)-(?=\d)', ' to ', text) # TODO: could be minus
91
  text = re.sub(r'(?<=\d)S', ' S', text)
92
- text = re.sub(r"(?<=[A-Z])'?s", lambda m: m.group().upper(), text)
93
  text = re.sub(r'(?:[A-Za-z]\.){2,} [a-z]', lambda m: m.group().replace('.', '-'), text)
94
  text = re.sub(r'(?i)(?<=[A-Z])\.(?=[A-Z])', '-', text)
95
  return parens_to_angles(text).strip()
 
89
  text = re.sub(r'(?<=\d),(?=\d)', '', text)
90
  text = re.sub(r'(?<=\d)-(?=\d)', ' to ', text) # TODO: could be minus
91
  text = re.sub(r'(?<=\d)S', ' S', text)
92
+ text = re.sub(r"(?<=[A-Z])'?s", "'S", text)
93
  text = re.sub(r'(?:[A-Za-z]\.){2,} [a-z]', lambda m: m.group().replace('.', '-'), text)
94
  text = re.sub(r'(?i)(?<=[A-Z])\.(?=[A-Z])', '-', text)
95
  return parens_to_angles(text).strip()