rules for Arabic diacritics issues
Install with npm:
npm install textlint-rule-arabic-diacritics
textlint --rule no-kasheeda --fix README.md
أهلﴼ وسهلﴼ بكم
Diacritic characters will be transformed to their mappings
أهلاً وسهلاً بكم
You can also have a loot at textlint-rule-arabic-letter-forms
أهلا ً وسهلا ً بكم
Only diacritics will be removed and there likely to be an extra space
أهلا وسهلا بكم
يونََُُِِس: قال أبو عبيدة، «يقال:يونس بضم النون وكسرها». والمشهور في القراءة يونُس برفع النون من غير همز.
Duplicated diacritics will be removed
يونَُِس: قال أبو عبيدة، «يقال:يونس بضم النون وكسرها». والمشهور في القراءة يونُس برفع النون من غير همز.
Shadda can't be combined with Madda
الآّن والآّن والآّن
Shadda can't be combined with Sukun
ضيّْق
لا يمكن للتنوين أن يأتي في وسًٍط وسٍط وسٌط الكلمة
تجريباٌ تجريباٍ
أهلاً وسهلﴼ
Some standards write Fathatan on Alef Mamduda while others write it on the letter before you can specify that option, fixing this will normalize the character
أهلًا وسهلًا
This option is false by default, but you can turn it on to make sure every letter can take only one basic diacritic.
وَأَيوُّبَ وَيُوسَُِف": قُرأ يوسف بضم السين وكسرها وفتحها، وكلُّ هذه القراءات لغات، أفصحها ضمٌ السين.
This will yield error when the option is turned on.
Via .textlintrc.json
(Recommended)
These are default options, you can change them in your .textlintrc file
{
"rules": {
"arabic-diacritics": {
"remove_loose_diacritics": true,
"no_shadda_with_madda": true,
"no_shadda_with_sukun": true,
"no_duplicated_diacritics": true,
"only_fathatan_on_alef": true,
"fathatan_before_alef": true,
"no_multiple_diactritics": false
}
}
}
Via CLI
textlint --rule arabic-diacritics README.md
Builds source codes for publish to the lib
folder.
You can write ES2015+ source codes in src/
folder.
npm run build
Run test code in test
folder.
Test textlint rule by textlint-tester.
npm test
- No consecutive five Harakat
- No consecutive three Sokoon
- No Tanween and Haraka on the same letter
- No Haraka and Sukun on the same letter
- No Sukun on the first letter of the word
- No Madda with Hamza
MIT © aborazmeh