-
Notifications
You must be signed in to change notification settings - Fork 451
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
Number spelling #682
base: master
Are you sure you want to change the base?
Number spelling #682
Conversation
Thank you @akx for your improvements! I was trying to figure out the recursion but I could not reproduce it in my original code. I also found an error regarding the default ruleset for the I would also improve the smoke test by stepping through the available public rulesets instead of |
Hello! I have my own implementation for number spelling (Hungarian only), but I just found out that this may be part of babel. Looks like tests for unsupported python versions are failed only. How can I help to finish the implementation? |
Hi, nice to have more people on board :) I also started with my own implementation (#114) then the folks here convinced me that the CLDR RBNF is the way to go. I think the basic implementation of the RBNF rule engine is working now and @akx cleaned up the code. I think we need to improve the tests and somehow reproduce the recursion error to address that, basic tests for English and Hungarian already run smoothly. |
31815c9
to
9731112
Compare
A pure Python engine for parsing RBNF rules. The rules are incomplete in many cases, fractional number spelling is hardly supported. Based on an earlier discussion: python-babel#114 and referenced in python-babel#179
Thank you @blagasz for a great initial effort! I cleaned up things here and there (refactoring, performance issues, even some bugs).
There's also a smoke test to try and verify we get some result for every technically supported locale, but there are some infinite recursion cases involving year formatting I couldn't really figure out. These are marked XFAIL for the time being:
In addition, fractional formatting results are rather strange, but as the original PR's description said, it's still a work in progress.
Closes #660 (supersedes it)