---
title: "Automated Prediction of Medieval Arabic — Alnajjar 2020"
description: "Arabic is normally written without diacritics, the marks that encode short vowels, gemination and similar features."
authors: ["Khalid Alnajjar", "Mika Hamalainen", "Niko Partanen", "Jack Rueter"]
year: 2020
venue: "arXiv:2010.05269"
source: "https://arxiv.org/abs/2010.05269"
doi: "10.48550/arxiv.2010.05269"
arxiv: "2010.05269"
licence: "CC BY-NC-SA 4.0 (arXiv)"
licence_url: "http://creativecommons.org/licenses/by-nc-sa/4.0/"
summary_licence: "Elamur Cosmic License"
canonical: "https://research.elamur.ai/free/en/papers/alnajjar-2020-automated-prediction-medieval-arabic-diacritics/"
---
[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/alnajjar-2020-automated-prediction-medieval-arabic-diacritics/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2020](https://md.research.elamur.ai/free/en/papers/2020/) / Automated Prediction of Medieval Arabic Diacritics

# Automated Prediction of Medieval Arabic Diacritics

**Authors:** [Khalid Alnajjar](https://md.research.elamur.ai/free/en/authors/khalid-alnajjar/), [Mika Hamalainen](https://md.research.elamur.ai/free/en/authors/mika-hamalainen/), Niko Partanen, [Jack Rueter](https://md.research.elamur.ai/free/en/authors/jack-rueter/) · **Year:** 2020 · **Venue:** arXiv:2010.05269 · **Licence:** [CC BY-NC-SA 4.0 (arXiv)](http://creativecommons.org/licenses/by-nc-sa/4.0/)

**Links:** [Publisher's page](https://arxiv.org/abs/2010.05269) · [PDF](https://arxiv.org/pdf/2010.05269) · [DOI 10.48550/arxiv.2010.05269](https://doi.org/10.48550/arxiv.2010.05269) · [arXiv 2010.05269](https://arxiv.org/abs/2010.05269) · [OpenAlex](https://openalex.org/W3091929408)

**Citations:** 1 citations (openalex-snapshot · 2026-10-14) · [2](#cited-by) in our library, of the 140884 papers whose bibliographies we read

## Summary
Arabic is normally written without diacritics, the marks that encode short vowels, gemination and similar features. Many word forms therefore have several possible readings, which causes problems for NLP, speech technology and learners. Modern Standard Arabic diacritization is well studied, but historical varieties have received little attention. The authors built parallel data from the Medieval Arabic dictionary Al-Qāmūs l-Muhīt, which is fully vocalized. They removed the diacritics automatically to get unmarked input paired with marked output. They then trained character-level NMT models: an LSTM bi-directional RNN with attention, built in OpenNMT. They varied how many words the model sees at once, from 1 to 10 words and whole sentences. Scoring was by word error rate, so a word counts as correct only if all its diacritics are right. A five-word window worked best, with WER 34.09. The online baseline scored 61.20. The released model, haracat, makes the method usable for digitized historical Arabic texts.

## Key points
- **Data:** about 58,000 dictionary "sentences" (averaging 8 words) were taken from the XML of Al-Qāmūs l-Muhīt, distributed via the CLARIN Virtual Language Observatory. The data was split 70/15/15 for training, validation and evaluation.
- **Ambiguity:**
  - At the type level, 82.6% of undiacritized words have only one vocalization.
  - At the token level, only 35.5% do, so frequent words carry most of the ambiguity.
  - Up to 22 variants exist, but only for two words.
- **Model:**
  - Character-level BRNN with LSTM cells, 2 encoder and 2 decoder layers, and Luong global attention.
  - OpenNMT default settings, 100,000 training steps.
  - Characters are space-separated, diacritics are separate target tokens, and word boundaries are marked with "_".
- **WER results:**
  - No prediction: 87.98.
  - Baseline (Mishkal online tool): 61.20.
  - 1 word: 42.63; 5 words: 34.09 (best); 10 words: 49.20; whole sentence: 58.72.
- **Release:** the five-word model is the pip-installable Python library `haracat`, archived on Zenodo.

## Interesting ideas
- The authors got supervision for free by taking a fully annotated source and deleting the annotation, which yields perfectly aligned input–output pairs without manual labelling. — For Mova (learn): Restoration tasks could be trained the same way by stripping information from gold-marked UD treebank text, such as punctuation or casing, and learning to put it back.
- Sweeping the context window showed a U-shaped curve: too little context starves the model, while too much hurts it, so window size should be tuned. — For Mova (tokens): The tagger and lemmatizer could have their context width swept explicitly, instead of assuming that wider is always better.
- They scored whole words rather than individual diacritics, because a partially correct word is useless downstream and per-mark scores look misleadingly good. — For Mova (learn): Frame extraction could be scored as a whole frame being right (predicate plus all roles), alongside per-role scores, so partial hits do not inflate the numbers.
- Measuring ambiguity at both the type and the token level showed that rare forms are mostly unambiguous, while frequent ones need context to resolve. — For Mova (tokens): Computing type- versus token-level POS and lemma ambiguity from treebanks would show where context-driven disambiguation rules or features pay off most.
- They reported a "do nothing" score (87.98) next to the baseline, giving a floor that every model must clearly beat. — For Mova (learn): Each evaluation could include a trivial identity or no-op output as a negative control, to show how much a component actually adds.

*Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.*

Fields: [Linguistics & languages](https://md.research.elamur.ai/free/en/shelves/linguistics/)

## Cited by

Cited by

2 papers of our library cite it (of the 140884 whose bibliographies we read); 1 of them have a page here, 1 not yet.

- [Harnessing Multilingual Resources to Question Answering in Arabic](https://md.research.elamur.ai/free/en/papers/alnajjar-2022-harnessing-multilingual-resources-question-answering/)

## Cite

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@misc{alnajjar2020automated,
  title = {{Automated Prediction of Medieval Arabic Diacritics}},
  author = {Alnajjar, Khalid and Hamalainen, Mika and Partanen, Niko and Rueter, Jack},
  year = {2020},
  doi = {10.48550/arxiv.2010.05269},
  eprint = {2010.05269},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2010.05269}
}
```

- [← previous Automated Phonological Transcription of Akkadian Cuneiform Text](https://md.research.elamur.ai/free/en/papers/lingbulk-2020-sahala-automated-phonological-transcription-akkadian-cuneiform/)
- [next → Automatic Arabic Dialect Identification Systems for Written Texts: A Survey](https://md.research.elamur.ai/free/en/papers/althobaiti-2020-automatic-arabic-dialect-identification-systems/)
- [↑ back to papers of 2020](https://md.research.elamur.ai/free/en/papers/2020/)

## References

14 references, 5 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

1. Abandah, G. A., Graves, A., Al-Shagoor, B., Arabiyat, A., Jamour, F., and Al-Taee, M. (2015). Automatic diacritization of arabic text using recurrent neural networks. In-pip install haracat 5 words 34.09 4 words 34.40 6 words 36.30 7 words 39.08 8 words 41.90 9 words 46.59 10 words 49.20 whole sentence 58.72 ternational Journal on Document Analysis and Recognition (IJDAR), 18(2):183–197. [find](https://scholar.google.com/scholar?q=Abandah%2C+G%2E+A%2E%2C+Graves%2C+A%2E%2C+Al%2DShagoor%2C+B%2E%2C+Arabiyat%2C+A%2E%2C+Jamour%2C+F%2E%2C+and+Al%2DTaee%2C+M%2E+%282015%29%2E+Automatic+diacritization+of+arabic+text+using+recurrent+neural+networks%2E+In%2Dpip+install+haracat+5+words+34)
2. Adouane, W., Bernardy, J.-P., and Dobnik, S. (2019). Normalising non-standardised orthography in algerian code-switched user-generated data. In Proceedings of the 5th Workshop on Noisy User-generated Text (W-NUT 2019), pages 131–140. [find](https://scholar.google.com/scholar?q=Adouane%2C+W%2E%2C+Bernardy%2C+J%2E%2DP%2E%2C+and+Dobnik%2C+S%2E+%282019%29%2E+Normalising+non%2Dstandardised+orthography+in+algerian+code%2Dswitched+user%2Dgenerated+data%2E+In+Proceedings+of+the+5th+Workshop+on+Noisy+User%2Dgenerated+)
3. Belinkov, Y. and Glass, J. (2015). Arabic diacritization with recurrent neural networks. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 2281–2285. [find](https://scholar.google.com/scholar?q=Belinkov%2C+Y%2E+and+Glass%2C+J%2E+%282015%29%2E+Arabic+diacritization+with+recurrent+neural+networks%2E+In+Proceedings+of+the+2015+Conference+on+Empirical+Methods+in+Natural+Language+Processing%2C+pages+2281%E2%80%932285%2E) [our card](https://md.research.elamur.ai/free/en/papers/aclbulk-2015-belinkov-arabic-diacritization-recurrent-neural-networks/)
4. Darwish, K., Mubarak, H., and Abdelali, A. (2017). Arabic diacritization: Stats, rules, and hacks. In Proceedings of the Third Arabic Natural Language Processing Workshop, pages 9–17. [find](https://scholar.google.com/scholar?q=Darwish%2C+K%2E%2C+Mubarak%2C+H%2E%2C+and+Abdelali%2C+A%2E+%282017%29%2E+Arabic+diacritization%3A+Stats%2C+rules%2C+and+hacks%2E+In+Proceedings+of+the+Third+Arabic+Natural+Language+Processing+Workshop%2C+pages+9%E2%80%9317%2E) [our card](https://md.research.elamur.ai/free/en/papers/aclbulk-2017-darwish-arabic-diacritization-stats-rules-hacks/)
5. Gal, Y. (2002). An hmm approach to vowel restoration in arabic and hebrew. In Proceedings of the ACL-02 Workshop on Computational Approaches to Semitic Languages, SEMITIC ’02, page 1–7, USA. Association for Computational Linguistics. [find](https://scholar.google.com/scholar?q=Gal%2C+Y%2E+%282002%29%2E+An+hmm+approach+to+vowel+restoration+in+arabic+and+hebrew%2E+In+Proceedings+of+the+ACL%2D02+Workshop+on+Computational+Approaches+to+Semitic+Languages%2C+SEMITIC+%E2%80%9902%2C+page+1%E2%80%937%2C+USA%2E+Associati) [our card](https://md.research.elamur.ai/free/en/papers/aclbulk-2002-gal-hmm-approach-vowel-restoration-arabic/)
6. Hämäläinen, M. and Hengchen, S. (2019). From the Paft to the Fiiture: a fully automatic NMT and Word Embeddings Method for OCR Post-Correction. In Recent Advances in Natural Language Processing, pages 432–437. INCOMA. [find](https://scholar.google.com/scholar?q=H%C3%A4m%C3%A4l%C3%A4inen%2C+M%2E+and+Hengchen%2C+S%2E+%282019%29%2E+From+the+Paft+to+the+Fiiture%3A+a+fully+automatic+NMT+and+Word+Embeddings+Method+for+OCR+Post%2DCorrection%2E+In+Recent+Advances+in+Natural+Language+Processing%2C+pages)
7. Klein, G., Kim, Y., Deng, Y., Senellart, J., and Rush, A. M. (2017). OpenNMT: Open-Source Toolkit for Neural Machine Translation. In Proc. ACL. [find](https://scholar.google.com/scholar?q=Klein%2C+G%2E%2C+Kim%2C+Y%2E%2C+Deng%2C+Y%2E%2C+Senellart%2C+J%2E%2C+and+Rush%2C+A%2E+M%2E+%282017%29%2E+OpenNMT%3A+Open%2DSource+Toolkit+for+Neural+Machine+Translation%2E+In+Proc%2E+ACL%2E) [our card](https://md.research.elamur.ai/free/en/papers/klein-2017-opennmt-open-source-toolkit-neural/)
8. Levenshtein, V. I. (1966). Binary codes capable of correcting deletions, insertions, and reversals. Soviets Physics Doklady, 10(8):707–710. [find](https://scholar.google.com/scholar?q=Levenshtein%2C+V%2E+I%2E+%281966%29%2E+Binary+codes+capable+of+correcting+deletions%2C+insertions%2C+and+reversals%2E+Soviets+Physics+Doklady%2C+10%288%29%3A707%E2%80%93710%2E)
9. Luong, M.-T., Pham, H., and Manning, C. D. (2015). Effective approaches to attention-based neural machine translation. arXiv preprint arXiv:1508.04025. [↗](https://arxiv.org/abs/1508.04025)
10. Nelken, R. and Shieber, S. M. (2005). Arabic diacritization using weighted finite-state transducers. In Proceedings of the ACL Workshop on Computational Approaches to Semitic Languages, pages 79–86. Association for Computational Linguistics. [find](https://scholar.google.com/scholar?q=Nelken%2C+R%2E+and+Shieber%2C+S%2E+M%2E+%282005%29%2E+Arabic+diacritization+using+weighted+finite%2Dstate+transducers%2E+In+Proceedings+of+the+ACL+Workshop+on+Computational+Approaches+to+Semitic+Languages%2C+pages+79%E2%80%9386%2E+A) [our card](https://md.research.elamur.ai/free/en/papers/aclbulk-2005-nelken-arabic-diacritization-weighted-finite-state/)
11. Partanen, N., Hämäläinen, M., and Alnajjar, K. (2019). Dialect text normalization to normative standard finnish. In Proceedings of the 5th Workshop on Noisy User-generated Text (W-NUT 2019), pages 141–146. [find](https://scholar.google.com/scholar?q=Partanen%2C+N%2E%2C+H%C3%A4m%C3%A4l%C3%A4inen%2C+M%2E%2C+and+Alnajjar%2C+K%2E+%282019%29%2E+Dialect+text+normalization+to+normative+standard+finnish%2E+In+Proceedings+of+the+5th+Workshop+on+Noisy+User%2Dgenerated+Text+%28W%2DNUT+2019%29%2C+pages+141)
12. Zitouni, I. and Sarikaya, R. (2009). Arabic diacritic restoration approach based on maximum entropy models. Computer Speech & Language, 23(3):257–276. 8. [find](https://scholar.google.com/scholar?q=Zitouni%2C+I%2E+and+Sarikaya%2C+R%2E+%282009%29%2E+Arabic+diacritic+restoration+approach+based+on+maximum+entropy+models%2E+Computer+Speech+%26+Language%2C+23%283%29%3A257%E2%80%93276%2E+8%2E)
13. Language Resource References Goosen, T. and Eckart, T. (2014). Virtual language observatory 3.0: What’s new. In CLARIN annual conference. [find](https://scholar.google.com/scholar?q=Language+Resource+References+Goosen%2C+T%2E+and+Eckart%2C+T%2E+%282014%29%2E+Virtual+language+observatory+3%2E0%3A+What%E2%80%99s+new%2E+In+CLARIN+annual+conference%2E)
14. Nahli, O., Zarghili, A., and Khalfi, M. (2019). al-qāmūs l-muh.ı̄t.: a digital arabic dictionary. [https://hdl.handle.net/20.500.11752/ILC-97@format=cmdi](https://hdl.handle.net/20.500.11752/ILC-97@format=cmdi). Laboratory of Intelligent Systems and Applications, Faculty of Sciences and Technology, Morocco. [↗](https://hdl.handle.net/20.500.11752/ILC-97@format=cmdi)
