The Effect of Domain and Ambiguity in Yorùbá Automatic Diacritic Restoration

Authors

  • Micheal Tomiwa Oyebamiji Department of Data Science, Faculty of Computing, University of Ibadan, Ibadan, Oyo, Nigeria
  • Jennifer Ogochukwu Ibekwe Department of Linguistics, Faculty of Arts, University of Uyo, Uyo, Akwa-Ibom, Nigeria
  • Faith Ayomide Ajiboyede Department of Computer Science, Faculty of Computing, University of Ibadan, Ibadan, Oyo, Nigeria

DOI:

https://doi.org/10.34148/teknika.v15i3.1600

Keywords:

Yorùbá, Automatic Diacritic Restoration, Domain Adaptation, Lexical Ambiguity, Low-resource NLP

Abstract

In Yorùbá, diacritics are used to denote the meaning of a word. Without them, the same string of characters may mean different things. Efforts to automatically restore diacritics have mostly used test text from the same sources as the training data. To assess performance outside that range, four Automatic Diacritic Restoration (ADR) systems were evaluated on two datasets: 664 sentences from the West African Senior School Certificate Examination (WAEC) Yorùbá paper, and 603 sentences from MultiDiac, a dataset built around words with several valid diacritized forms. Inputs were created by stripping diacritics from the datasets, and outputs were scored with WER, CER, DER and WDER. For robustness, two baselines were added: one returning the input unchanged, the other giving each word its most frequent diacritized form in the Menyo-20k training corpus. Systems were compared using paired bootstrap tests, with MultiDiac scored on its held out dev split. Each reference word was classified by whether it appeared in the training corpus in the required diacritized form, a different form, or not at all. On DER, the BiLSTM ami (1.29M parameters) and mT5_base_yoruba_adr (582.4M) did not differ significantly on WAEC (0.4025 vs 0.4187) or MultiDiac (0.4349 vs 0.4273), while both outperformed the unigram baseline (0.5102 on WAEC, 0.4805 on MultiDiac). Errors on MultiDiac were higher despite better vocabulary coverage, because many of its words appeared in training mostly in a different form. These findings suggest that more varied training data, rather than larger models, may be the better route to improved restoration.

Downloads

Download data is not yet available.

References

[1] I. Shode, D. I. Adelani, and A. Feldman, "YOSM: A new Yorùbá sentiment corpus for movie reviews," in Proc. ICLR 2022 Workshop AfricaNLP, 2022. [Online]. Available: https://openreview.net/forum?id=rRzx5qzVIb9

[2] A. Aremu, J. O. Alabi, and D. I. Adelani, "YORC: Yorùbá Reading Comprehension Dataset," in Proc. Seventh Widening NLP Workshop (WiNLP 2023), 2023.

[3] T. V. Asubiaro, "Statistical patterns of diacritized and undiacritized Yorùbá texts," Journal of Information Science Theory and Practice, 2015.

[4] J. C. Wells, "Orthographic diacritics and multilingual computing," Language Problems and Language Planning, vol. 24, no. 3, pp. 249-272, 2000, doi: 10.1075/lplp.24.3.04wel.

[5] D. I. Adelani, D. Ruiter, J. O. Alabi, D. Adebonojo, A. Ayeni, M. Adeyemi, A. E. Awokoya, and C. España-Bonet, "The effect of domain and diacritics in Yorùbá-English neural machine translation," in Proc. Machine Translation Summit XVIII: Research Track, 2021, pp. 61-75. [Online]. Available: https://aclanthology.org/2021.mtsummit-research.6

[6] kenny0bi, "ami-yoruba-diacritics," Hugging Face, 2023. [Online]. Available: https://huggingface.co/kenny0bi/ami-yoruba-diacritics

[7] H. O. Toyin, S. M. Magdy, and H. Aldarmaki, "Are LLMs good text diacritizers? An Arabic and Yorùbá case study," in Proc. LREC 2026, 2026, pp. 580-589.

[8] A. Akinlabi and T. Sanghal, "Improving English-Yorùbá neural machine translation through dataset curation, diacritic restoration, and fine-tuning of mT5 models," UC Berkeley Recent Work, 2025. [Online]. Available: https://escholarship.org/uc/item/1rw396k3

[9] T. P. Adewumi, F. Liwicki, and M. Liwicki, "The challenge of diacritics in Yorùbá embeddings," in ML4D Workshop at NeurIPS 2020, 2020. [Online]. Available: https://arxiv.org/abs/2011.07605

[10] I. Orife, "Attentive sequence-to-sequence learning for diacritic restoration of Yorùbá language text," in Proc. Interspeech 2018, 2018, pp. 2848-2852, doi: 10.21437/Interspeech.2018-42.

[11] I. Orife, D. I. Adelani, T. Fasubaa, V. Williamson, W. F. Oyewusi, O. Wahab, and K. Tubosun, "Improving Yorùbá diacritic restoration," in Proc. ICLR 2020 AfricaNLP Workshop, 2020. [Online]. Available: https://arxiv.org/abs/2003.10564

[12] A. M. Olawole, J. O. Alabi, A. K. Sakpere, and D. I. Adelani, "YAD: Leveraging T5 for improved automatic diacritization of Yorùbá text," in Proc. AfricaNLP Workshop at ICLR 2024, 2024. [Online]. Available: https://arxiv.org/abs/2412.20218

[13] J. I. Ayoola and P. O. Olukanmi, "Automatic diacritization models for a high-population low-resource African language (Yorùbá)," Applied Sciences, vol. 16, no. 12, p. 6195, 2026, doi: 10.3390/app16126195.

[14] A. Adegoke-Elijah, O. A. Odejobi, and A. S. Salawu, "Lexical ambiguity resolution system for standard Yorùbá verbs," American Journal of Engineering Research, vol. 7, no. 6, pp. 170-176, 2018.

[15] A. A. Akindele, "Resolving lexical verb ambiguity in Yorùbá through semantic web annotations," Yoruba Studies Review, vol. 8, no. 1, 2023, doi: 10.32473/ysr.8.1.134096.

[16] I. Adebara and M. Abdul-Mageed, "Towards Afrocentric NLP for African languages: Where we are and where we can go," in Proc. 60th Annual Meeting of the Association for Computational Linguistics, 2022, pp. 3300-3319, doi: 10.18653/v1/2022.acl-long.265.

[17] I. Inuwa-Dutse, "NaijaNLP: A survey of Nigerian low-resource languages," arXiv preprint arXiv:2502.19784, 2025. [Online]. Available: https://arxiv.org/abs/2502.19784

[18] T. A. Jimoh, T. De Wille, and N. S. Nikolov, "Bridging gaps in natural language processing for Yorùbá: A systematic review of a decade of progress and prospects," Natural Language Processing Journal, vol. 13, p. 100194, 2025, doi: 10.1016/j.nlp.2025.100194.

[19] Lexilogos, "Yoruba keyboard," Lexilogos. [Online]. Available: https://www.lexilogos.com/keyboard/yoruba.htm

[20] Davlan, "mT5_base_yoruba_adr," Hugging Face. [Online]. Available: https://huggingface.co/Davlan/mT5_base_yoruba_adr

[21] Davlan, "byt5-small-diacritizer-menyo," Hugging Face. [Online]. Available: https://huggingface.co/Davlan/byt5-small-diacritizer-menyo

[22] Davlan, "omowe-t5-small-diacritizer-all-und-full," Hugging Face. [Online]. Available: https://huggingface.co/Davlan/omowe-t5-small-diacritizer-all-und-full

[23] L. Xue, A. Barua, N. Constant, R. Al-Rfou, S. Narang, M. Kale, A. Roberts, and C. Raffel, "ByT5: Towards a token-free future with pre-trained byte-to-byte models," Transactions of the Association for Computational Linguistics, vol. 10, pp. 291-306, 2022, doi: 10.1162/tacl_a_00461.

[24] T. Wolf et al., "Transformers: State-of-the-art natural language processing," in Proc. 2020 Conf. Empirical Methods in Natural Language Processing: System Demonstrations, 2020, pp. 38-45, doi: 10.18653/v1/2020.emnlp-demos.6.

[25] V. I. Levenshtein, "Binary codes capable of correctingdeletions, insertions and reversals," Soviet Physics Doklady, vol. 10, no. 8, pp. 707-710, 1966.

[26] T. von Neumann, C. Boeddeker, K. Kinoshita, M. Delcroix, and R. Haeb-Umbach, "On word error rate definitions and their efficient computation for multi-speaker speech recognition systems," in Proc. ICASSP 2023, Rhodes Island, Greece, 2023, pp. 1-5, doi: 10.1109/ICASSP49357.2023.10094784.

[27] T. D. K, J. James, D. P. Gopinath, and M. A. K, "Advocating character error rate for multilingual ASR evaluation," in Findings of the Association for Computational Linguistics: NAACL 2025, Albuquerque, New Mexico, Apr. 2025, pp. 4941-4950, doi: 10.18653/v1/2025.findings-naacl.277.

[28] I. Zitouni, J. S. Sorensen, and R. Sarikaya, "Maximum entropy based restoration of Arabic diacritics," in Proc. 21st International Conference on Computational Linguistics and 44th Annual Meeting of the ACL, 2006, pp. 577-584, doi: 10.3115/1220175.1220248.

[29] L. Gessler and A. Zeldes, "MicroBERT: Effective training of low-resource monolingual BERTs through parameter reduction and multitask learning," in Proc. 2nd Workshop on Multi-lingual Representation Learning (MRL), Abu Dhabi, United Arab Emirates, 2022, pp. 86-99.

[30] P. Koehn, "Statistical significance tests for machine translation evaluation," in Proc. 2004 Conf. Empirical Methods in Natural Language Processing, Barcelona, Spain, 2004, pp. 388-395.

[31] B. Efron and R. J. Tibshirani, An Introduction to the Bootstrap. New York, NY, USA: Chapman & Hall, 1993.

The Effect of Domain and Ambiguity in Yorùbá Automatic Diacritic Restoration

Downloads

Published

2026-11-24

How to Cite

The Effect of Domain and Ambiguity in Yorùbá Automatic Diacritic Restoration. (2026). Teknika, 15(3), 583-596. https://doi.org/10.34148/teknika.v15i3.1600