diacbench / README.md
olumideola's picture
Update README.md
3f9f427 verified
|
Raw
History Blame Contribute Delete
8.86 kB
metadata
license: cc-by-2.0
language:
  - es
  - fr
  - it
  - pt
  - pl
  - tr
  - vi
  - ig
  - yo
  - ha
task_categories:
  - text-generation
tags:
  - diacritics
  - diacritization
  - accent-restoration
  - tone-restoration
  - benchmark
  - african-languages
  - nigerian-languages
  - olaverse
pretty_name: DiacBench
size_categories:
  - 1K<n<10K
dataset_info:
  - config_name: es
    features:
      - name: input
        dtype: string
      - name: reference
        dtype: string
    splits:
      - name: test
        num_bytes: 113456
        num_examples: 1000
    download_size: 80612
    dataset_size: 113456
  - config_name: fr
    features:
      - name: input
        dtype: string
      - name: reference
        dtype: string
    splits:
      - name: test
        num_bytes: 115382
        num_examples: 1000
    download_size: 80032
    dataset_size: 115382
  - config_name: ha
    features:
      - name: input
        dtype: string
      - name: reference
        dtype: string
    splits:
      - name: test
        num_bytes: 261427
        num_examples: 1000
    download_size: 159909
    dataset_size: 261427
  - config_name: ig
    features:
      - name: input
        dtype: string
      - name: reference
        dtype: string
    splits:
      - name: test
        num_bytes: 245460
        num_examples: 1000
    download_size: 142874
    dataset_size: 245460
  - config_name: it
    features:
      - name: input
        dtype: string
      - name: reference
        dtype: string
    splits:
      - name: test
        num_bytes: 101129
        num_examples: 1000
    download_size: 68920
    dataset_size: 101129
  - config_name: pl
    features:
      - name: input
        dtype: string
      - name: reference
        dtype: string
    splits:
      - name: test
        num_bytes: 101049
        num_examples: 1000
    download_size: 74107
    dataset_size: 101049
  - config_name: pt
    features:
      - name: input
        dtype: string
      - name: reference
        dtype: string
    splits:
      - name: test
        num_bytes: 115146
        num_examples: 1000
    download_size: 80657
    dataset_size: 115146
  - config_name: tr
    features:
      - name: input
        dtype: string
      - name: reference
        dtype: string
    splits:
      - name: test
        num_bytes: 97828
        num_examples: 1000
    download_size: 66072
    dataset_size: 97828
  - config_name: vi
    features:
      - name: input
        dtype: string
      - name: reference
        dtype: string
    splits:
      - name: test
        num_bytes: 114939
        num_examples: 1000
    download_size: 70565
    dataset_size: 114939
  - config_name: yo
    features:
      - name: input
        dtype: string
      - name: reference
        dtype: string
    splits:
      - name: test
        num_bytes: 183397
        num_examples: 1000
    download_size: 104432
    dataset_size: 183397
configs:
  - config_name: es
    data_files:
      - split: test
        path: es/test-*
  - config_name: fr
    data_files:
      - split: test
        path: fr/test-*
  - config_name: ha
    data_files:
      - split: test
        path: ha/test-*
  - config_name: ig
    data_files:
      - split: test
        path: ig/test-*
  - config_name: it
    data_files:
      - split: test
        path: it/test-*
  - config_name: pl
    data_files:
      - split: test
        path: pl/test-*
  - config_name: pt
    data_files:
      - split: test
        path: pt/test-*
  - config_name: tr
    data_files:
      - split: test
        path: tr/test-*
  - config_name: vi
    data_files:
      - split: test
        path: vi/test-*
  - config_name: yo
    data_files:
      - split: test
        path: yo/test-*

DiacBench

A 10-language benchmark for diacritics/accent restoration, built by Olaverse Lab to evaluate diacnet-1.0 and any other diacritic restoration system on equal footing.

Each language config contains ~1,000 sentence pairs: a diacritic-stripped input and the original, correctly diacritized reference. The task is to reconstruct the reference from the input.

{"input": "se eranko naa si gbo o?", "reference": "ṣé ẹranko náà sì gbọ́ ọ?"}

Why this exists

Diacritics/tone restoration is under-benchmarked outside a handful of European languages, and almost entirely unbenchmarked for Nigerian languages. Existing resources are fragmented (a Yorùbá-only set here, a 12-European-language set there) and several rely on infrastructure that isn't always reliably reachable. DiacBench brings 10 languages — including Yorùbá, Igbo, and Hausa — into one consistently-built, easily-reproducible dataset, released openly so other models can be compared on the same test sets.

Languages

Code Language Diacritic type
es Spanish accents (é, ñ, ü)
fr French accents (é, è, ç)
it Italian accents (à, è, ù)
pt Portuguese accents (ã, ç, õ)
pl Polish special letters (ł, ż, ą)
tr Turkish special letters (ı/İ, ş, ğ)
vi Vietnamese tone + vowel marks (dense — every syllable can carry one)
ig Igbo tone + underdots (ị, ọ, dotted vowels)
yo Yorùbá tone marks (high/low/mid pitch — often lexically ambiguous)
ha Hausa hooked consonants (ɓ, ɗ, ƙ) — not tonal

How it was built

Diacritics are stripped deterministically (Unicode NFD decomposition + removal of combining marks, plus explicit folding for base letters with no combining form, e.g. ɓ→b, đ→d, ı→i) to produce the input from the reference. This makes the task fully self-supervised — no manual annotation was needed, since any clean, correctly-diacritized sentence is automatically both a label and (after stripping) an input.

Source text per language, chosen for reliable, redistribution-friendly access:

Languages Source License
es, fr, it, pt, pl, tr, vi Tatoeba sentence exports CC-BY 2.0 FR
ig, ha MasakhaNEWS CC-BY 4.0
yo MENYO-20k test split CC-BY-NC 4.0

Sentences were filtered to 30–200 characters and required to contain at least one diacritic in their original form (so the task is non-trivial for every example), then deduplicated. Selection used a fixed random seed (42) for reproducibility.

⚠️ Note on the Yorùbá config's license: MENYO-20k is CC-BY-NC-4.0 (non-commercial). The yo config inherits that restriction even though the rest of the dataset is CC-BY — see per-config license note below. If you need a fully commercial-safe Yorùbá set, use the other 9 configs' methodology (Tatoeba/Wikipedia-derived) to build your own yo split instead.

Splits / configs

One config per language code (es, fr, it, pt, pl, tr, vi, ig, yo, ha), each with a single test split.

from datasets import load_dataset
ds = load_dataset("olaverse/diacbench", "yo", split="test")

Evaluating a model

Reference evaluation code (metrics: WER, CER, ChrF) is available in the notebook used to produce the diacnet-1.0 benchmark results. In short:

  1. Feed each input to your model.
  2. Compare its output against reference using word error rate (WER), character error rate (CER), and ChrF.
  3. A copy-input baseline (returning the input unchanged) is the recommended floor to report alongside your model — it shows how much of the reference text a language's diacritics actually affect, and any working system should clear it by a wide margin.

Known limitations

  • Domain skew. Tatoeba sentences are short and conversational; MasakhaNEWS is news-domain; MENYO-20k is mixed-domain translation data. Scores are not necessarily comparable across languages for this reason — compare systems within a language, not raw scores between languages.
  • Not aligned with prior published benchmarks. The es/fr/it/pt/pl/tr/vi sets follow the same construction methodology as the LINDAT diacritics corpus (Náplava et al., 2018) but are not the same sentences, so scores here are not directly comparable to numbers published against LINDAT. Likewise, the yo config is the MENYO-20k test split, not the YAD benchmark (Adelani et al.) — the two are related (YAD's training data derives from MENYO-20k) but not identical.
  • Single-domain-per-language, not stress-tested on noisy/informal real-world text (typos, code-switching, mixed scripts).
  • Hausa is not tonal — its diacritics are hooked consonants, a different phenomenon from the tone marks in Yorùbá/Igbo/Vietnamese. Don't read Hausa scores as measuring the same underlying task.

Citation

@misc{diacbench,
  title  = {DiacBench: A 10-Language Diacritics Restoration Benchmark},
  author = {Olaverse},
  year   = {2026},
  url    = {https://huggingface.co/datasets/olaverse/diacbench}
}

License

CC-BY-2.0 overall, except the yo config, which is CC-BY-NC-4.0 (inherited from MENYO-20k — non-commercial use only). Attribute Tatoeba, MasakhaNEWS, and MENYO-20k as the underlying sources per their respective terms.