Update handler.py
Browse files- handler.py +3 -3
handler.py
CHANGED
@@ -36,12 +36,12 @@ class EndpointHandler():
|
|
36 |
|
37 |
@staticmethod
|
38 |
def remove_special_characters_s(text: Text) -> Text:
|
39 |
-
chars_to_remove_regex = '[
|
40 |
# remove special characters
|
41 |
text = re.sub(chars_to_remove_regex, '', text)
|
42 |
-
text = re.sub("
|
43 |
text = re.sub("’", "'", text)
|
44 |
-
text = re.sub(
|
45 |
text = text.lower()
|
46 |
return text
|
47 |
|
|
|
36 |
|
37 |
@staticmethod
|
38 |
def remove_special_characters_s(text: Text) -> Text:
|
39 |
+
chars_to_remove_regex = '[\=\´\–\“\”\…\=]'
|
40 |
# remove special characters
|
41 |
text = re.sub(chars_to_remove_regex, '', text)
|
42 |
+
text = re.sub("‘", "'", text)
|
43 |
text = re.sub("’", "'", text)
|
44 |
+
text = re.sub("´", "'", text)
|
45 |
text = text.lower()
|
46 |
return text
|
47 |
|