-
Notifications
You must be signed in to change notification settings - Fork 501
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
Fix several issues with num2words in Arabic #512
Fix several issues with num2words in Arabic #512
Conversation
…hould not change
add a test function for a big numbers
- change maxval to 10 ** 51. - add comments to abs & to_str functions. - change a list of integer_value by a pow condition
@mrodriguezg1991 Is there somebody who could review this? |
Hello, thanks for your contribution, can you update your code to pass flake8 validation ?? |
@mrodriguezg1991 Thanks for spotting. Code formatting issues are fixed now. |
@Jeronymous can you pull the master branch in your PR?, because it does not let me merge because the PR is behind |
@mrodriguezg1991 Sure. Merged |
Thanks for merging @mrodriguezg1991 Note that these issues could be closed (we forgot to mention them in commit messages, and I don't have permissions to close them): |
As of version 0.5.8, the num2words library does not correctly convert some numbers to words in Arabic. It erroneously appends the Arabic equivalent of "one" to the translation of 1000 (one thousand), when it must be implicit. Expected output: 'ألف و مئتان و أربعة و ثلاثون , ست و خمسون' 0.5.9: >>> from num2words import num2words >>> num2words(1234.56, lang="ar") 'واحد ألف و مئتان و أربعة و ثلاثون , ست و خمسون' This bug has been fixed in version 0.5.13 of the library: 0.5.13: >>> from num2words import num2words >>> num2words(1234.56, lang="ar") 'ألف و مئتان و أربعة و ثلاثون , ست و خمسون' This commit updates the requirements.txt to use the version of the library that produces the correct output. opw-3756778 References: + savoirfairelinux/num2words#512
There are several issues with Arabic language: https://github.com/savoirfairelinux/num2words/issues?q=is%3Aissue+is%3Aopen+arabic
Some previous work was never merged (and got outdated): #404
This PR fixes:
also a bug on French:
This PR does not fix (yet?)