-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for partially written numbers and numbers in text2num #27
Comments
That's on purpose. Converting digit strings to integers is already supported by the As for the mix of styles, what use cases are you thinking about? |
Hi, "Sismo na China provocou 20 mil mortos e 26 mil feridos" "Violentas explosões abalam Beirute. 100 mortos, 4 mil feridos e "muitos desaparecidos"" Text2num renders these as "20 1000", "26 1000", "4 000" Would it be possible to improve on this? |
Hi luismavs, |
Hi, |
Currently, partially written numbers throw ValueError. It would be an interesting addition to handle such cases.
Expected result:
10000000
Similarly, numbers represented as text also throw ValueError instead of being converted to int.
Expected result:
10
The text was updated successfully, but these errors were encountered: