Diacritics are orthographic marks that clarify pronunciation, distinguish similar words, or alter meaning. They play a central role in many writing systems, yet their impact on language technology has not been systematically quantified across scripts. While prior work has examined diacritics in individual languages, there's no cross-linguistic, data-driven framework for measuring the degree to which writing systems rely on them and how this affects downstream tasks. We propose a data-driven framework for quantifying diacritic complexity using corpus-level, information-theoretic metrics that capture the frequency, ambiguity, and structural diversity of character-diacritic combinations. We compute these metrics over 24 corpora in 15 languages, spanning both single- and multi-diacritic scripts. We then examine how diacritic complexity correlates with performance on the task of diacritics restoration, evaluating BERT- and RNN-based models. We find that across languages, higher diacritic complexity is strongly associated with lower restoration accuracy. In single-diacritic scripts, where character-diacritic combinations are more predictable, frequency-based and structural measures largely align. In multi-diacritic scripts, however, structural complexity exhibits the strongest association with performance, surpassing frequency-based measures. These findings show that measurable properties of diacritic usage influence the performance of diacritic restoration models, demonstrating that orthographic complexity is not only descriptive but functionally relevant for modeling.
Figures & tables
“Corpus”
Chars
Diacs
Uniq. Diacs
RS
DTS
DSS
El niño bebió café en la mañana
25
4
2
0.28
0.15
0.11
hayElEd +sAtAh qApEh bab*oqEr!
14
14
6
0.33
0.54
0.52
Table 1: Example sentences in Spanish and Hebrew illustrating how diacritic-based metrics are computed. The table reports the number of characters, total diacritics, number of unique diacritics, and the resulting RS, DTS, and DSS values.
Language
Diacritic
Multi
% Words
% Lines
Mean
# Runes
System
Ger Source
Density %
Diacritics %
Diacs/Word
German
1.357
0.000
8.011
67.021
1.017
3
Single
Ger UD 2.15 (GSD), 2.10 (HDR)
Spanish
2.336
0.000
11.349
86.454
1.008
7
Single
Ger UD2.10 (AnCora), 2.9 (GSD)
Croatian
2.607
0.000
13.812
73.601
1.052
4
Single
Table 2: Corpus-level diacritic usage across languages. For languages represented by multiple corpora, statistics are averaged across corpora. The columns present overall diacritic density (ordering key), proportion of multi-diacritic characters, percentage of words and lines that are diacritized, mean diacritics per diacritized word, corpus-wide number of distinct character–diacritic combinations (runes), and classification as single- or multi-diacritic writing systems.
Language
Family
Density
RS
DTS
DSS
RNN-Word
RNN-Rune
BERT-Rune
BERT-Word
German
Indo-Euro
1.374
0.044
0.031
0.009
94.245
99.088
99.045
94.888
Spanish
Indo-Euro
2.330
0.092
0.069
0.018
91.513
98.426
98.299
94.038
Croatian
Indo-Euro
2.583
0.058
0.039
0.023
93.753
98.911
99.336
96.613
Galician
Indo-Euro
2.985
0.111
0.082
0.021
92.488
98.717
99.142
95.963
Portuguese
Indo-Euro
3.694
0.150
0.114
0.047
94.805
99.033
99.170
96.526
French
Indo-Euro
3.763
0.131
0.096
0.058
91.539
98.405
97.627
91.421
Table 3: Language-level averages of diacritic complexity metrics and diacritization performance, ordered by increasing diacritic density. For languages represented by multiple corpora, values are averaged across corpora. RS = Rune Surprisal; DTS = Diacritic Token Surprisal; DSS = Diacritic Structural Surprisal. Model performance is reported as word-level and rune-level accuracy for RNN and BERT-based diacritizers.
Regime
Metric
BERT-Rune
BERT-Word
RNN-Rune
RNN-Word
Single-diacritic scripts
RS
− 0.47
− 0.55* **
− 0.80***
− 0.62**
DSS
− 0.50* **
− 0.57* **
− 0.76***
− 0.57* **
Multi-diacritic scripts
RS
− 0.59
− 0.50
–
–
DSS
− 0.95**
− 0.92**
–
–
Table 4: Pearson correlations between diacritization accuracy and diacritic complexity metrics: Rune Surprisal (RS) and Diacritic Structural Surprisal (DSS). Significance: * p<0.05 , ** p<0.01 , *** p<0.001 .
Yorùbá is a widely spoken tonal language that depends on diacritics to avoid lexical ambiguity. However, it is often written without these diacritics, thereby hindering downstream Natural Language Processing (NLP) tasks. In this paper, we introduce Yo-ByT5, a byte-level Automatic Diacritic Restoration (ADR) model fine-tuned from ByT5-small. We evaluate Yo-ByT5 alongside five publicly released Yorùbá ADR models and one open-weight large language model (LLM) on the YAD benchmark under a consistent protocol. Our results demonstrate that Yo-ByT5 matches the performance of the strongest existing model, mT5-base, with a DER of 10.14% and a CER of 3.48%. Furthermore, it exhibits superior text fidelity despite using approximately half the parameter count of mT5-base. We also release our training code and model outputs, as well as call for the development of a larger, purpose-built benchmark for Yorùbá diacritic restoration.
Ahmad Samuel Gali, Shamsuddeen Hassan Muhammad
University of Lagos · Bayero University Kano · Imperial College London
Kashmiri, an Indo-Aryan language written in a modified Perso-Arabic script, frequently omits diacritic marks in digital text, creating ambiguity and challenging downstream NLP applications. We present Koshur Diacritizer, a ByT5-small byte-level sequence-to-sequence model for restoring diacritics in Kashmiri text. To support this task, we release a publicly available dataset of 23.7k aligned undiacritized diacritized Kashmiri sentence pairs. The proposed framework combines script-aware normalization, alignment validation, and skeleton-preserving inference to ensure reliable restoration while maintaining the original base-letter sequence. Experimental results on a held-out test set achieve a DERm of 0.2012 and a WER of 0.2159. Additionally, evaluation by a native Kashmiri linguistic expert yields a mean accuracy of 77.5%. The dataset, model, and source code are publicly released to provide a reproducible baseline for Kashmiri diacritic restoration and future low-resource language research.
In this work, we address diacritic restoration for Arabic speech transcripts. Most speech data are undiacritized, limiting the ability of modeling fine-grained phonological distinctions. The speech modality has recently been explored as a way to complement text-based diacritic restoration efforts. We propose an efficient non-autoregressive approach for speech-to-text diacritization based on Connectionist Temporal Classification (CTC). Our method incorporates hard constraints during decoding by constructing a character-level diacritization lattice from an undiacritized transcript and restricting hypotheses to valid diacritized realizations. We evaluate on Classical Arabic and Modern Standard Arabic test sets (namely, ArVoice and ClArTTS) against a more computationally-complex multi-modal diacritic restoration baseline, and show statistically significant reductions in diacritic error rates in both, demonstrating that the proposed approach offers both performance and efficiency gains.
Rufael Marew, Amr Keleg, Hanan Aldarmaki
Mohamed Bin Zayed University of Artificial Intelligence, UAE