normalize_arabic
Normalize Arabic text for consistent matching by removing diacritics, tatweel, and unifying alef variants. Use for search keys, deduplication, and comparison, not for display.
Instructions
Normalise Arabic text so that forms users type interchangeably compare equal — strips diacritics and tatweel and folds the alef variants. Use it for search keys, deduplication and matching, never for text you are about to display.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | The Arabic text to normalise. | |
| convertDigits | No | Convert Arabic-Indic digits into 0-9. Default false. | |
| unifyTaaMarbuta | No | Fold ة into ه. Helps fuzzy matching, changes meaning. Default false. | |
| unifyAlefMaqsura | No | Fold ى into ي. Helps fuzzy matching, changes meaning. Default false. | |
| collapseWhitespace | No | Collapse whitespace runs. Default false. |