Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -68,8 +68,8 @@ def number_to_words(number):
|
|
| 68 |
return str(number)
|
| 69 |
|
| 70 |
def normalize_text(text):
|
| 71 |
-
# ➤ Beddel
|
| 72 |
-
text = re.sub(r'(?i)zamzam', 'samsam', text)
|
| 73 |
|
| 74 |
# ➤ Ka saar tirooyin leh koma iyo tobanle
|
| 75 |
text = re.sub(r'(\d{1,3})(,\d{3})+', lambda m: m.group(0).replace(",", ""), text)
|
|
|
|
| 68 |
return str(number)
|
| 69 |
|
| 70 |
def normalize_text(text):
|
| 71 |
+
# ➤ Beddel ereyga zamzam dhammaan noocyadiisa (bilow, dhex, dhammaad)
|
| 72 |
+
text = re.sub(r'(?i)(?<!\w)zamzam(?!\w)', 'samsam', text)
|
| 73 |
|
| 74 |
# ➤ Ka saar tirooyin leh koma iyo tobanle
|
| 75 |
text = re.sub(r'(\d{1,3})(,\d{3})+', lambda m: m.group(0).replace(",", ""), text)
|