Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -68,10 +68,10 @@ def number_to_words(number):
|
|
| 68 |
return str(number)
|
| 69 |
|
| 70 |
def normalize_text(text):
|
| 71 |
-
#
|
| 72 |
-
text = re.sub(r'
|
| 73 |
|
| 74 |
-
#
|
| 75 |
text = re.sub(r'(\d{1,3})(,\d{3})+', lambda m: m.group(0).replace(",", ""), text)
|
| 76 |
text = re.sub(r'\.\d+', '', text)
|
| 77 |
def replace_num(match):
|
|
|
|
| 68 |
return str(number)
|
| 69 |
|
| 70 |
def normalize_text(text):
|
| 71 |
+
# ➤ Beddel dhammaan noocyada zamzam (xaraf weyn/yari ama dhexda ku jira)
|
| 72 |
+
text = re.sub(r'(?i)zamzam', 'samsam', text) # (?i) = ignore case
|
| 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)
|
| 76 |
text = re.sub(r'\.\d+', '', text)
|
| 77 |
def replace_num(match):
|