What tashkeel is and when harakat are written
Arabic script writes consonants and long vowels, but not short vowels. Those are added as small marks called harakat: fatha (a), damma (u), kasra (i), sukun (no vowel), shadda (a doubled consonant) and tanwin (the endings -an, -un, -in). Adding these marks to a text is called tashkeel, or vocalization.
Newspapers, books, signs and everyday messages are almost always written without harakat: fluent readers fill in the vowels from context. They are written in the Quran, in children's books and textbooks, in classical poetry, and occasionally to remove an ambiguity. The word كتب, for example, can be read kataba (he wrote), kutub (books) or kutiba (it was written). For learners, for teachers preparing worksheets, and for anyone feeding text to a text-to-speech engine, a fully vowelled text makes a real difference.
How to use the tool
- Paste your text into the box, or type it with the site's Arabic virtual keyboard.
- Click 'Add harakat'. The first time, the model (about 14 MB) downloads; after that it loads from the cache.
- Read through the result. To fix a letter, put the cursor right after it and click the haraka you want in the row of buttons.
- Copy the result. 'Remove harakat' does the reverse and gives you plain, unvowelled text.
The vocalization is done by Shakkelha, an open-source recurrent neural network (MIT licence) trained on Classical and Modern Standard Arabic. It runs in your browser with ONNX Runtime Web, so nothing is sent to a server.
Where automatic tashkeel goes wrong, and how to check it
A model like this vowels most letters correctly, but not all of them. Mistakes cluster in a few places worth checking first:
- Case endings (i'rab). The final vowel of a word depends on its role in the sentence: subject, object, after a preposition. This is the hardest part; check it word by word.
- Shadda and tanwin. A missing shadda or a misplaced tanwin changes the reading or the meaning. Tanwin fatha is usually written on the letter before the final alif (كتابًا).
- The article al-. Before a sun letter (ت، د، ر، س، ش، ن and others) the lam is silent and the next letter takes a shadda (الشَّمس); before a moon letter the lam takes a sukun (القَمَر).
- Proper nouns, foreign words and ambiguous words, where context is not always enough.
For the Quran, poetry, teaching material or anything that will be published, have the output checked by someone who knows Arabic grammar well, or compare it with a trusted vowelled edition.
Tips for better results
The model does best on short, well-punctuated sentences, so split long paragraphs. It is built for standard and classical Arabic; dialect text, or text mixed with Latin-script words, gives less reliable results. Fix typos before you run it, because one wrong letter throws off the vowels of the whole word. And if your text already carries a few incorrect harakat, strip them first with the remove button, then run the tool again.