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|
+
- es
|
| 12 |
+
- fr
|
| 13 |
+
- it
|
| 14 |
+
multilinguality: multilingual
|
| 15 |
+
pretty_name: DiacNet 1.1 Ambiguity Lexicon & Gloss Tables
|
| 16 |
+
size_categories:
|
| 17 |
+
- 1K<n<10K
|
| 18 |
+
tags:
|
| 19 |
+
- diacritics
|
| 20 |
+
- diacritization
|
| 21 |
+
- word-sense-disambiguation
|
| 22 |
+
- lexicon
|
| 23 |
+
- glossary
|
| 24 |
+
- yoruba
|
| 25 |
+
- igbo
|
| 26 |
+
- hausa
|
| 27 |
+
- vietnamese
|
| 28 |
+
configs:
|
| 29 |
+
- config_name: yor
|
| 30 |
+
data_files: gloss_curate_yor.csv
|
| 31 |
+
- config_name: ibo
|
| 32 |
+
data_files: gloss_curate_ibo.csv
|
| 33 |
+
- config_name: hau
|
| 34 |
+
data_files: gloss_curate_hau.csv
|
| 35 |
+
- config_name: vie
|
| 36 |
+
data_files: gloss_curate_vie.csv
|
| 37 |
+
- config_name: pol
|
| 38 |
+
data_files: gloss_curate_pol.csv
|
| 39 |
+
- config_name: tur
|
| 40 |
+
data_files: gloss_curate_tur.csv
|
| 41 |
+
- config_name: por
|
| 42 |
+
data_files: gloss_curate_por.csv
|
| 43 |
+
- config_name: spa
|
| 44 |
+
data_files: gloss_curate_spa.csv
|
| 45 |
+
- config_name: fra
|
| 46 |
+
data_files: gloss_curate_fra.csv
|
| 47 |
+
- config_name: ita
|
| 48 |
+
data_files: gloss_curate_ita.csv
|
| 49 |
+
---
|
| 50 |
+
|
| 51 |
+
# DiacNet 1.1 Ambiguity Lexicon & Gloss Tables
|
| 52 |
+
|
| 53 |
+
Per-language tables of **diacritic-ambiguous words** — words whose diacritic-stripped form maps to two or more distinct diacritized variants — extracted from the [diacnet-1.1-corpus](https://huggingface.co/datasets/olaverse/diacnet-1.1-corpus) and annotated with variant type and English glosses.
|
| 54 |
+
|
| 55 |
+
Built to power the **gloss-conditioning feature** of `diacnet-1.1`: at training time, ambiguous words in the input can be annotated with their intended English meaning (e.g. `[g: ogun=war]`), teaching the model to use user-supplied sense hints when restoring diacritics. Only variants typed `sense` participate in gloss injection; the other types feed marking-consistency augmentation instead.
|
| 56 |
+
|
| 57 |
+
## Files & loading
|
| 58 |
+
|
| 59 |
+
One CSV per language (`gloss_curate_{lang}.csv`), each exposed as a config:
|
| 60 |
+
|
| 61 |
+
```python
|
| 62 |
+
from datasets import load_dataset
|
| 63 |
+
yor = load_dataset("olaverse/diacnet-1.1-gloss", "yor", split="train")
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
or as plain CSVs:
|
| 67 |
+
|
| 68 |
+
```python
|
| 69 |
+
from huggingface_hub import hf_hub_download
|
| 70 |
+
import pandas as pd
|
| 71 |
+
df = pd.read_csv(hf_hub_download("olaverse/diacnet-1.1-gloss",
|
| 72 |
+
"gloss_curate_yor.csv", repo_type="dataset"))
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
## Schema
|
| 76 |
+
|
| 77 |
+
| Column | Type | Description |
|
| 78 |
+
|---|---|---|
|
| 79 |
+
| `stripped` | string | Diacritic-stripped surface form shared by all variants in the group |
|
| 80 |
+
| `variant` | string | A diacritized form found in the corpus (NFC) |
|
| 81 |
+
| `freq` | int | Corpus frequency of this variant |
|
| 82 |
+
| `total_freq` | int | Combined frequency of all retained variants in the group |
|
| 83 |
+
| `type` | string | `sense` \| `spelling_variant` \| `proper_noun` \| `skip` (see below) |
|
| 84 |
+
| `gloss_en` | string | English gloss — filled only for `sense` rows; may carry a `[REVIEW]` flag |
|
| 85 |
+
|
| 86 |
+
### `type` semantics
|
| 87 |
+
|
| 88 |
+
- **`sense`** — genuine lexical/grammatical ambiguity: the variants are *different words or word-forms* whose distinction is recoverable only from context or an external hint (e.g. Yorùbá `ogún` "twenty/inheritance" vs `ògùn` "medicine/charm"; Spanish `término` "term" vs `terminó` "he/she finished"; Vietnamese `sách` "book" vs `sạch` "clean"). These rows drive gloss injection.
|
| 89 |
+
- **`spelling_variant`** — same lexeme, different marking completeness or legal orthographic alternatives (e.g. Yorùbá `ninu` vs `nínú`, both "inside"; Portuguese `econômica`/`económica`, Brazilian vs European norm; Italian `perché`/`perchè`). Used for marking-consistency training, **not** glossing.
|
| 90 |
+
- **`proper_noun`** — names/places with transliteration variance (Nàìjíríà, Söke, Elysée, Antônio/António).
|
| 91 |
+
- **`skip`** — excluded rows: encoding noise (e.g. Vietnamese forms using `ð` (eth) instead of `đ`) or unresolvable low-frequency items.
|
| 92 |
+
|
| 93 |
+
## How it was built
|
| 94 |
+
|
| 95 |
+
1. Tokenized the full `diacnet-1.1-corpus` train split per language; grouped words by diacritic-stripped form.
|
| 96 |
+
2. Kept groups with ≥2 variants each clearing an absolute frequency floor (≥20) **and** a minimum share of the group (≥2%) — filtering out OCR/typo tails masquerading as variants.
|
| 97 |
+
3. Kept only groups with ≥2 *distinctly marked* variants (a bare form plus one marked form is marking-completeness noise, not ambiguity).
|
| 98 |
+
4. Content words prioritized (stripped length > 3); note the limitation on monosyllables below.
|
| 99 |
+
5. `type` and `gloss_en` drafted by an LLM (Claude) using per-language strategies: rule-based classification for regular grammatical patterns (Polish case alternation, French participle/present, Spanish stress-accent grammar) plus hand-curated entries for lexical polysemy; Vietnamese glossed fully by hand (399/401 groups); Yorùbá curated conservatively against dictionary-attested tonal minimal pairs.
|
| 100 |
+
|
| 101 |
+
## Per-language statistics
|
| 102 |
+
|
| 103 |
+
| lang | groups | rows | `sense` rows | sense groups | spelling_variant | proper_noun | skip | ⚠ review-flagged |
|
| 104 |
+
|---|---:|---:|---:|---:|---:|---:|---:|---:|
|
| 105 |
+
| yor | 1,126 | 2,487 | 44 | 19 | 2,440 | 3 | 0 | 11 |
|
| 106 |
+
| ibo | 152 | 315 | 8 | 3 | 307 | 0 | 0 | 2 |
|
| 107 |
+
| hau | 14 | 28 | 6 | 3 | 20 | 2 | 0 | 2 |
|
| 108 |
+
| vie | 401 | 1,191 | 1,185 | 399 | 0 | 0 | 6 | 0 |
|
| 109 |
+
| pol | 244 | 488 | 470 | 235 | 18 | 0 | 0 | 0 |
|
| 110 |
+
| tur | 79 | 159 | 87 | 43 | 72 | 0 | 0 | 1 |
|
| 111 |
+
| por | 44 | 88 | 12 | 6 | 70 | 6 | 0 | 0 |
|
| 112 |
+
| spa | 20 | 40 | 38 | 19 | 2 | 0 | 0 | 0 |
|
| 113 |
+
| fra | 199 | 401 | 387 | 192 | 12 | 2 | 0 | 0 |
|
| 114 |
+
| ita | 18 | 36 | 0 | 0 | 30 | 6 | 0 | 0 |
|
| 115 |
+
|
| 116 |
+
The cross-language pattern is itself informative: **Vietnamese** ambiguity is near-total (tonal monosyllabic language — stripping tones collapses the lexicon), **Spanish/Polish/French** ambiguity is mostly *grammatical* (stress-accent, case, tense distinctions), **Italian** has essentially none (accent pairs are standard-vs-misspelling), and **Yorùbá/Igbo/Hausa** corpus variance is dominated by *marking completeness* rather than polysemy — with a small, high-value core of true tonal minimal pairs in Yorùbá.
|
| 117 |
+
|
| 118 |
+
## Known limitations
|
| 119 |
+
|
| 120 |
+
- **Annotations are LLM-drafted, not native-speaker-verified.** Rows whose gloss contains `[REVIEW]` (16 total, concentrated in yor/ibo/hau) are explicitly uncertain. A native-speaker pass over Yorùbá and Hausa `sense` rows is recommended before treating those glosses as ground truth. Report corrections via the community tab.
|
| 121 |
+
- **Yorùbá monosyllables are under-represented.** The extraction deprioritized stripped forms ≤3 characters as probable function words — but much of Yorùbá's real tonal polysemy lives in monosyllabic verbs (`sọ`/`só`, `wá`/`wà`, `gbà`/`gbá`, `bá`/`bà`, `lọ`/`lo`, `rí`/`rì`, `fẹ́`/`fẹ̀`). A supplementary monosyllable table is planned.
|
| 122 |
+
- Frequencies reflect the diacnet-1.1-corpus (FineWeb-2 + Wikipedia after density filtering), not general language use; register skews toward web/encyclopedic text.
|
| 123 |
+
- Vietnamese glosses give the *dominant* meaning(s) with a disambiguating example compound; many syllables have additional senses not listed.
|
| 124 |
+
|
| 125 |
+
## Provenance & license
|
| 126 |
+
|
| 127 |
+
Derived from [diacnet-1.1-corpus](https://huggingface.co/datasets/olaverse/diacnet-1.1-corpus) (FineWeb-2, ODC-By 1.0; Wikipedia, CC BY-SA 4.0). Released under **ODC-By 1.0**. Attribute upstream sources per their terms.
|
| 128 |
+
|
| 129 |
+
## Citation
|
| 130 |
+
|
| 131 |
+
```
|
| 132 |
+
@dataset{diacnet_1_1_gloss,
|
| 133 |
+
author = {olaverse},
|
| 134 |
+
title = {DiacNet 1.1 Ambiguity Lexicon \& Gloss Tables},
|
| 135 |
+
year = {2026},
|
| 136 |
+
publisher = {Hugging Face},
|
| 137 |
+
url = {https://huggingface.co/datasets/olaverse/diacnet-1.1-gloss}
|
| 138 |
+
}
|
| 139 |
+
```
|