A Context-Contrastive Inference Approach To Partial Diacritization
Muhammad ElNokrashy, Badr AlKhamissi
TL;DR
This work tackles the challenge of partial diacritization in Arabic by introducing Context-Contrastive Partial Diacritization (CCPD), which selects diacritics by contrasting contextually informed predictions with non-contextual ones. The approach integrates with existing full diacritization systems and is evaluated via new performance indicators (SR, DER, P-DER, B-DER, RE-DER, SU) and a Transformer-based TD2 model, revealing a trade-off between diacritic coverage and readability. A behavioral study with native readers supports the notion that partial diacritization can enhance reading ease under time constraints, motivating the targeted marking strategy. Overall, CCPD, complemented by TD2 and the proposed metrics, provides a practical, adaptable framework for improving text accessibility and downstream NLP performance in Arabic, with potential applicability to other diacritics-rich languages.
Abstract
Diacritization plays a pivotal role in improving readability and disambiguating the meaning of Arabic texts. Efforts have so far focused on marking every eligible character (Full Diacritization). Comparatively overlooked, Partial Diacritzation (PD) is the selection of a subset of characters to be marked to aid comprehension where needed. Research has indicated that excessive diacritic marks can hinder skilled readers -- reducing reading speed and accuracy. We conduct a behavioral experiment and show that partially marked text is often easier to read than fully marked text, and sometimes easier than plain text. In this light, we introduce Context-Contrastive Partial Diacritization (CCPD) -- a novel approach to PD which integrates seamlessly with existing Arabic diacritization systems. CCPD processes each word twice, once with context and once without, and diacritizes only the characters with disparities between the two inferences. Further, we introduce novel indicators for measuring partial diacritization quality, essential for establishing this as a machine learning task. Lastly, we introduce TD2, a Transformer-variant of an established model which offers a markedly different performance profile on our proposed indicators compared to all other known systems.
