Diacritics that can never change your letters.
diactag-2.0 restores marks in the same 11 languages as the rest of the DiacNet line, but it works differently. Instead of rewriting the sentence, it looks at each character and decides which marks belong on it, so the letters you typed always come back untouched.

Generative models are powerful but they write the sentence out again, and anything that rewrites can reword. For records, legal text or an archive of record, "usually only adds accents" is not good enough.
diactag-2.0 removes that risk by design. It only ever predicts marks, and it is small enough to run on an ordinary CPU, so you can put it straight into a product without a GPU bill.

Second-lowest error on Modern Standard Arabic news (0.086), with 0.0% of sentences altered, where the generative systems change letters in 14–24% of sentences.

Scored side by side, diactag-2.0 holds diactag-1.0’s accuracy on the original ten languages while adding Arabic to the same model.
Base characters are copied, never predicted, so the output is always your input with marks added.
Ranks second of five open Arabic diacritizers on Modern Standard Arabic benchmarks, and unlike the generative ones it never alters the input.
A 38.6 MB int8 ONNX export restores a typical sentence in about 8 ms on a laptop.
Leave the language out and its built-in detector picks it. Per-character confidence lets you send unsure marks for review.
from olaverse.nlp import Diacritizer
d = Diacritizer(model="diactag-2.0", lang="yor", onnx=True) # int8 on CPU
d.restore("se eranko naa si gbo o?") # → 'ṣé ẹranko náà sì gbọ́ ọ?'
ar = Diacritizer(model="diactag-2.0", lang="ar")
ar.restore("ذهب الطالب إلى المدرسة في الصباح", case_endings=False)
# No language? It detects one.
Diacritizer(model="diactag-2.0").restore("Toi khong biet tieng Viet")
# → 'Tôi không biết tiếng Việt'
# Per-character confidence for a review queue
text, details = d.restore("se eranko naa si gbo o?", return_details=True)Want the highest accuracy and typo correction? Use diacnet-2.0, or diacnet-mini-2.0 at half the size.
| diacnet-2.0 → | diacnet-mini-2.0 → | diactag-2.0THIS PAGE | |
|---|---|---|---|
| Parameters | 582M | 300M | 37.9M |
| How it works | Rewrites the text | Rewrites the text | Tags each character |
| Mean error rate, 10 languages | 0.0117 | 0.0141 | 0.0130 |
| Yorùbá error rate | 0.0698 | 0.0815 | 0.0787 |
| Strongest on | Yorùbá and European languages | Close to 2.0 at half the size | Igbo, Vietnamese, Modern Standard Arabic |
| Extras | Meaning hints, typo correction | Meaning hints, typo correction | CPU-ready ONNX, never alters letters |
Restore diacritics and tone marks on text that was typed, scraped, or keyed in without them, across 11 languages from Yorùbá and Igbo to Vietnamese, Polish and Arabic.
/ Text quality · ArabicRestore Arabic tashkīl, with or without case endings, for text-to-speech, teaching material and readable copy, from models that also cover ten other languages.
/ Search & retrievalRestore the marks your documents lost, then match on an accent-folded key, so a user typing "oko" finds "ọkọ" and still sees it written properly.
typed-decisions 0.720 · African TD 0.668
PurpleMISTtyped-decisions 0.601 · 1.9B
MIST-Extract91.8% docs fully right · 4B
MIST-Extract9.7 docs/s · 2B
LID-6080.867 acc · 140M
LID-60837 MB · 6,800 texts/s
MIST QG0.955 keep-rate · 25 langs