Spaces:
Running
on
Zero
Running
on
Zero
Upload app.py
Browse files
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"(?<=[
|
93 |
text = re.sub(r"(?<=X')S\b", 's', text)
|
94 |
text = re.sub(r'(?:[A-Za-z]\.){2,} [a-z]', lambda m: m.group().replace('.', '-'), text)
|
95 |
text = re.sub(r'(?i)(?<=[A-Z])\.(?=[A-Z])', '-', 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"(?<=[BCDFGHJ-NP-TV-Z])'?s\b", "'S", text)
|
93 |
text = re.sub(r"(?<=X')S\b", 's', text)
|
94 |
text = re.sub(r'(?:[A-Za-z]\.){2,} [a-z]', lambda m: m.group().replace('.', '-'), text)
|
95 |
text = re.sub(r'(?i)(?<=[A-Z])\.(?=[A-Z])', '-', text)
|