Addressing conversion to Arabic num2words grammatical cases and decimal part #626
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.
Fixes # by Rana Saab (bm-rana)
Changes proposed in this pull request:
Introduced a rafea parameter to methods like convert, to_currency, to_ordinal, and to_cardinal to control the grammatical case (رفع or نصب).
Updated the process_arabic_group method to properly handle grammatical cases for numbers and their associated words.
Added a change_arabic_word_end method to adjust word endings based on the grammatical case (e.g., converting "اثنا عشر" to "اثني عشر" in the Nasb case).
Modified decimal_value in lang_AR so that it takes the decimal part as it is with no modifications
Implemented a convert_fraction_to_text method to handle the conversion of decimal parts into Arabic text (e.g., "جزءاً واحد من المئة").
Updated the extract_integer_and_decimal_parts method to properly extract and process the decimal part of the number.
Ensured that decimal values are correctly converted into fractions (e.g., "اثنا عشر جزءاً من المئة").
Status
How to verify this change
Verify that the code correctly handles the Rafea (رفع) and Nasb (نصب) grammatical cases for numbers.
Verify that decimal parts are correctly converted into Arabic text (e.g., "جزءاً من المئة").
Additional notes