1 parent
299829f162
commit
bf8c802c5e
1 file changed
+1
-1
+1
-1
@@ -81,7 +81,7 @@ def sanitize_text(text: str) -> str:
|
||||
result = re.sub(regex_urls, " ", text)
|
||||
|
||||
# note: not removing apostrophes
|
||||
regex_expr = r"\s['|’]|['|’]\s|[\^_~@!&;#:\-–—%“”‘\"%\*/{}\[\]\(\)\\|<>=+]"
|
||||
regex_expr = r"\s['|’]|['|’]\s|[\^_~@!&;#:\-%—“”‘\"%\*/{}\[\]\(\)\\|<>=+]"
|
||||
result = re.sub(regex_expr, " ", result)
|
||||
result = result.replace("+", "plus").replace("&", "and")
|
||||
# remove extra whitespace
|
||||
|
||||
Reference in new issue
Block a user