Spaces:
Sleeping
Sleeping
Update idn_phonemes.py
Browse files- idn_phonemes.py +1 -1
idn_phonemes.py
CHANGED
|
@@ -74,7 +74,7 @@ def apply_ipa_map(text:str)->str:
|
|
| 74 |
t=text.lower()
|
| 75 |
for k in sorted(ipa_map,key=len,reverse=True):
|
| 76 |
t=re.sub(re.escape(k),ipa_map[k],t)
|
| 77 |
-
return
|
| 78 |
|
| 79 |
# --- Pipeline ---
|
| 80 |
def indo_to_ipa(text:str)->str:
|
|
|
|
| 74 |
t=text.lower()
|
| 75 |
for k in sorted(ipa_map,key=len,reverse=True):
|
| 76 |
t=re.sub(re.escape(k),ipa_map[k],t)
|
| 77 |
+
return re.sub(r'\s+',' ',t).strip()
|
| 78 |
|
| 79 |
# --- Pipeline ---
|
| 80 |
def indo_to_ipa(text:str)->str:
|