Commit
ยท
0dc87ee
1
Parent(s):
3cd2996
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ from num2tib.core import convert2text
|
|
| 10 |
import re
|
| 11 |
|
| 12 |
def replace_numbers_with_convert(sentence, wylie=True):
|
| 13 |
-
pattern = r'\d+'
|
| 14 |
def replace(match):
|
| 15 |
return convert(match.group(), wylie)
|
| 16 |
result = re.sub(pattern, replace, sentence)
|
|
|
|
| 10 |
import re
|
| 11 |
|
| 12 |
def replace_numbers_with_convert(sentence, wylie=True):
|
| 13 |
+
pattern = r'\d+(\.\d+)?'
|
| 14 |
def replace(match):
|
| 15 |
return convert(match.group(), wylie)
|
| 16 |
result = re.sub(pattern, replace, sentence)
|