Arabic text tools
text_arabicClean and normalize Arabic text: remove tashkeel/tatweel, normalize letters, convert digits and punctuation. Convert Arabizi/Franco-Arabic chat into Arabic script.
Instructions
Arabic text utilities. mode "clean": remove tashkeel (harakat and Quranic marks, optionally keeping shadda), remove tatweel (kashida), normalise letters (alef with hamza/madda/wasla → bare alef; alef maqsura and Farsi ya → ya; ta marbuta → ha; hamza on waw/ya → waw/ya), switch Latin , ; ? to Arabic punctuation, and convert digits (Arabic-Indic ↔ Western). mode "arabizi": turn Arabizi / Franco-Arabic chat text (mar7aba, 3arabi, 5ala9, el bait) into Arabic script. Returns the result with letter/word/character counts. Give "text" or a text file "path". Web version: https://s3eidat.github.io/arabic-tools/
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | "clean" = clean & normalise Arabic text (default); "arabizi" = Arabizi (Latin letters + numbers) → Arabic script. | clean |
| path | No | Or: a path to a UTF-8 text file. | |
| text | No | The text to transform. | |
| digits | No | clean: keep digits, convert Arabic-Indic/Persian digits to 0-9 ("western"), or 0-9 to Arabic-Indic ("arabic"). | keep |
| output | No | Optional: write the result to this file path (or folder ending in "/") instead of returning it. | |
| keepShadda | No | clean: when removing tashkeel, keep the shadda. | |
| normalizeYa | No | clean: alef maqsura and Farsi ya → Arabic ya. | |
| normalizeAlef | No | clean: alef with hamza above/below, madda or wasla → bare alef. | |
| removeTatweel | No | clean: remove tatweel / kashida (default true). | |
| taMarbutaToHa | No | clean: ta marbuta → ha. | |
| normalizeHamza | No | clean: hamza on waw → waw, hamza on ya → ya. | |
| removeTashkeel | No | clean: remove tashkeel / harakat (default true). | |
| arabicPunctuation | No | clean: Latin comma, semicolon and question mark → Arabic ones. |