Skip to content

Commit d405944

Browse files
authored
Merge pull request #2 from Hasan-Mesbaul-Ali-Taher/main
Update normalize.py
2 parents d80c3c4 + 01d922c commit d405944

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

normalizer/normalize.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ def normalize(
2929
# normalize variations of quotes
3030
text = fix_quotes(text)
3131

32-
# replace punctuations with specified replacement (if any)
33-
if punct_replacement is not None:
34-
text = const.PUNCT_HANDLER_REGEX.sub(punct_replacement, text)
35-
3632
# replace URLS in text with specified replacement (if any)
3733
if url_replacement is not None:
3834
text = const.URL_HANDLER_REGEX.sub(url_replacement, text)
3935

36+
# replace punctuations with specified replacement (if any)
37+
if punct_replacement is not None:
38+
text = const.PUNCT_HANDLER_REGEX.sub(punct_replacement, text)
39+
4040
# replace emojis in text with specified replacement (if any)
4141
if emoji_replacement is not None:
4242
text = const.EMOJI_HANDLER_REGEX.sub(emoji_replacement, text)

0 commit comments

Comments
 (0)