Skip to content
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

Adding support for decimal and negative numbers #11

Open
arnavkapoor opened this issue Jun 19, 2020 · 2 comments
Open

Adding support for decimal and negative numbers #11

arnavkapoor opened this issue Jun 19, 2020 · 2 comments

Comments

@arnavkapoor
Copy link
Collaborator

arnavkapoor commented Jun 19, 2020

Opening a new ticket for adding support for decimal and negative numbers. More details for the same discussed here.

Expected outcomes

> parse("he scored fifty three point six percent in the finals")
he scored 53.6 percent in the finals

> parse_number("twelve point seven")
12.7

> parse_number("minus 9.4")
-9.4
@Gallaecio
Copy link
Member

It may make sense to keep separate issues for each.

Also, for decimal numbers, https://docs.python.org/3/library/decimal.html should probably either be used, or be usable (á la parse_float=Decimal of json.loads).

@noviluni
Copy link
Contributor

noviluni commented Jul 6, 2020

Regarding decimal numbers, I've seen that the CLDR files contain the infinity word for about 26 locales, so it could be a good idea to add them in the future as float(inf). I didn't think it deeply, just wanted to add this idea here to avoid forgetting it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants