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
Improve Arabic implementation #176
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi @alhazmy13, Thanks for your PR It's still in Work In Progress. Did you plan to finish it ? |
Hi @ventilooo , Yes it's ready to merge it with master branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request:
SAR
,EGP
andKWD
currency.Status
How to verify this change
Run
test_ar.py
testsAdditional notes
What's the problem with current implementation?
A lot and a lot of grammar mistakes, Arabic language is very complicated, and when it comes to converting numbers to words, I think it is the most difficult language because it has so many rules that depend on the “number” state and the “counted” state.
For example:
The number one & two matches the counted in its feminine state, where the numbers from 3 to 10 are contrary to the counted, etc.
What's new?
This implementation has the ability to determine a digit feminine status using its group level & Currency Name Feminine field status.
The whole conversion process depends on dividing the number into Group Levels. Each group contains 3 digits & these levels are numbered as in this example:
Also, the Arabic language is sensitive to currency names which also depends on the number state, so I had to add four different names for the same currency name to support all cases. Their fields are used at the end of the method when constructing the final string.
I'll write a wiki page later when you approve and merge this.