Spaces:
Running
Running
Avoid having excess spaces
Browse files
app.py
CHANGED
@@ -34,6 +34,8 @@ def preprocess_text(arabic_text, remove_urls, remove_latin):
|
|
34 |
if remove_latin:
|
35 |
arabic_text = re.sub(r"[a-zA-Z]", "", arabic_text)
|
36 |
|
|
|
|
|
37 |
return arabic_text
|
38 |
|
39 |
|
|
|
34 |
if remove_latin:
|
35 |
arabic_text = re.sub(r"[a-zA-Z]", "", arabic_text)
|
36 |
|
37 |
+
arabic_text = arabic_text.strip()
|
38 |
+
|
39 |
return arabic_text
|
40 |
|
41 |
|