diff --git a/build/lib/sinatools/utils/parser.py b/build/lib/sinatools/utils/parser.py index d08fd6a..49f6fc4 100644 --- a/build/lib/sinatools/utils/parser.py +++ b/build/lib/sinatools/utils/parser.py @@ -93,6 +93,7 @@ def remove_punctuation(text): يَا أَيُّهَا الَّذِينَ آمَنُوا لِيَسْتَأْذِنْكُمُ """ + output_string = text try: if text: punctuation_marks = [r'[\u0021-\u002F]+', r'[U+060C]+', r'[\u003A-\u0040]+', @@ -100,7 +101,6 @@ def remove_punctuation(text): r'[\u061B]+', r'[\u061E]+', r'[\u061F]+', r'[\u0640]+', r'[\u0653]+', r'[\u065C]+', r'[\u066C]+', r'[\u066A]+', r'["}"]+', r'["{"]+'] - output_string = text for punctuation in punctuation_marks: output_string = re.sub(punctuation, '', output_string) except: @@ -138,4 +138,4 @@ def remove_latin(text): except: return text return text - \ No newline at end of file + diff --git a/sinatools/utils/parser.py b/sinatools/utils/parser.py index d08fd6a..49f6fc4 100644 --- a/sinatools/utils/parser.py +++ b/sinatools/utils/parser.py @@ -93,6 +93,7 @@ def remove_punctuation(text): يَا أَيُّهَا الَّذِينَ آمَنُوا لِيَسْتَأْذِنْكُمُ """ + output_string = text try: if text: punctuation_marks = [r'[\u0021-\u002F]+', r'[U+060C]+', r'[\u003A-\u0040]+', @@ -100,7 +101,6 @@ def remove_punctuation(text): r'[\u061B]+', r'[\u061E]+', r'[\u061F]+', r'[\u0640]+', r'[\u0653]+', r'[\u065C]+', r'[\u066C]+', r'[\u066A]+', r'["}"]+', r'["{"]+'] - output_string = text for punctuation in punctuation_marks: output_string = re.sub(punctuation, '', output_string) except: @@ -138,4 +138,4 @@ def remove_latin(text): except: return text return text - \ No newline at end of file +