-
Notifications
You must be signed in to change notification settings - Fork 23
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
[Query] number parser #62
Comments
I guess we could have a parameter that allows to determine whether ordinals are turned into ordinals or cardinals. Maybe ordinal syntax would be a better default. I also wonder if there are languages out there without an shorthand symbol to append to cardinal numbers to mark them as ordinals. If so, it may also be useful to provide a way to format these numbers with additional flexibility, e.g. allowing to define a custom string to use as suffix, or providing a callback parameter to do custom, complex formatting of these. |
There is one easy way to do it. |
Can we use this code to make the following changes 🤔 . |
https://github.com/savoirfairelinux/num2words looks good for that use case, yes. They seem well maintained, and support multiple locales. If we need any functionality they already have, like in here, I think we should just add them as a dependency rather than reimplement the functionality ourselves. |
From my experience by working on this project last year there are a number of tools that do allow you to go from Number -> Words like the num2words library, however the other way around Words -> Number is trickier with less support. Hence the primary challenge becomes to identify that the word 'First' (and other ordinal numbers in different languages) are actually referring to an ordinal number. |
Number parser example
can we make that 1 as 1st .
Something like this 🤔
The text was updated successfully, but these errors were encountered: