Arabic NLP: why it's harder, and what to do about it
Dialects, diacritics, morphology and mixed script — the specific problems Arabic poses for language models, and practical mitigations.
Models have improved substantially at Arabic, and they still underperform their English behaviour in ways that matter. Knowing where the gaps are lets you design around them rather than discovering them in production.
There is no single Arabic
Modern Standard Arabic dominates written formal content; people write to each other in dialect. A model trained mostly on MSA handles a Gulf or Egyptian customer message noticeably worse than a press release — and customer messages are what your product receives.
Morphology breaks naive retrieval
Arabic is heavily inflected, and a single root generates many surface forms. Keyword search that would work adequately for English misses badly here. Embedding-based retrieval helps; normalisation before indexing helps more.
Normalisation before indexing
Without it you are treating the same word as several different ones.
- 1
Unify alef forms
Users write hamza inconsistently. Normalise across both the corpus and the query.
- 2
Unify ya and alef maqsura
Frequently interchanged in real writing, especially informal text.
- 3
Standardise diacritics
Usually absent, sometimes present. Strip or apply consistently — not both.
- 4
Handle both digit sets
Arabic-Indic and Western digits appear in the same field.
- 5
Expect code-switching
Don't split on script boundaries mid-sentence.
Orthographic variation is everywhere
Diacritics are usually omitted and sometimes present. Hamza forms and the final ya/alef maqsura are written inconsistently by real users. Without normalisation you are treating the same word as several different ones.
- Normalise alef forms, ya/alef maqsura and ta marbuta before indexing
- Strip or standardise diacritics consistently across query and corpus
- Handle both Arabic-Indic and Western digits in the same field
- Expect code-switching mid-sentence and do not split on script boundaries
Tokenisation costs you money
Arabic typically consumes more tokens per unit of meaning than English in most tokenisers. The same conversation costs more and fills the context faster. Measure it on your real content rather than assuming parity.
Where models still underperform
Register
- Handled well
- Modern Standard Arabic
- Still weak
- Gulf and Egyptian dialect in customer messages
Retrieval
- Handled well
- Embeddings after normalisation
- Still weak
- Keyword search on inflected forms
Cost
- Handled well
- Comparable per request
- Still weak
- More tokens per unit of meaning
Evaluation
- Handled well
- Automated metrics
- Still weak
- Register and dialect appropriateness
| Handled well | Still weak | |
|---|---|---|
| Register | Modern Standard Arabic | Gulf and Egyptian dialect in customer messages |
| Retrieval | Embeddings after normalisation | Keyword search on inflected forms |
| Cost | Comparable per request | More tokens per unit of meaning |
| Evaluation | Automated metrics | Register and dialect appropriateness |
Evaluate with native speakers
Automated metrics translated from English benchmarks miss register, formality and dialect appropriateness — all of which determine whether output reads as competent or as machine-translated. This is one place where human evaluation is not optional.