File size: 7,732 Bytes
8841867
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
---
language: kab
license: cc0-1.0
size_categories:
  - 10K<n<100K
task_categories:
  - text-to-speech
  - text-to-audio
tags:
  - kabyle
  - taqbaylit
  - berber
  - tamazight
  - g2p
  - grapheme-to-phoneme
  - ipa
  - phonemization
  - tts
  - low-resource
configs:
  - config_name: default
    data_files:
      - split: train
        path: kab_g2p_train.tsv
---

# Kabyle G2P Training Data

[![Dataset](https://img.shields.io/badge/HuggingFace-Dataset-yellow)](https://huggingface.co/datasets/boffire/kabyle-g2p-training-data)
[![License](https://img.shields.io/badge/License-CC0-blue.svg)](https://creativecommons.org/publicdomain/zero/1.0/)
[![Language](https://img.shields.io/badge/Language-Kabyle-green)](https://en.wikipedia.org/wiki/Kabyle_language)

Phonetically-annotated Kabyle (Taqbaylit) text corpus for training Grapheme-to-Phoneme (G2P) models. Generated using the [orthography2ipa](https://github.com/athmanemokraoui/orthography2ipa) rule-based phonemizer for Kabyle.

---

## Dataset Overview

| Property | Value |
|----------|-------|
| **Language** | Kabyle (kab) — Afro-Asiatic, Berber |
| **Total pairs** | 59,462 |
| **Source** | [boffire/kabyle-piper-22khz](https://huggingface.co/datasets/boffire/kabyle-piper-22khz) |
| **Phonemizer** | [orthography2ipa](https://github.com/athmanemokraoui/orthography2ipa) (dev branch) |
| **IPA standard** | Narrow transcription with Kabyle-specific allophony |
| **License** | CC0 (inherited from source) |

---

## Files

| File | Format | Description |
|------|--------|-------------|
| `kab_g2p_train.tsv` | TSV (tab-separated) | `graphemes\tphonemes` |
| `kab_g2p_train.jsonl` | JSONL | `{"graphemes": "...", "phonemes": "..."}` |
| `kab_g2p_train.txt` | Plain text | `graphemes|phonemes` (pipe-delimited) |

---

## Phonological Features

The phoneme annotations reflect the following Kabyle-specific rules:

### Consonants
| Grapheme | Phoneme | Notes |
|----------|---------|-------|
| `ɣ` | `ʁ` | Voiced uvular fricative |
| `ɛ` | `ʕ` | Voiced pharyngeal fricative |
| `ḍ` | `ðˤ` | Emphatic interdental |
| `ṭ` | `tˤ` | Emphatic dental |
| `ṣ` | `sˤ` | Emphatic alveolar |
| `ẓ` | `zˤ` | Emphatic alveolar |
| `ṛ` | `rˤ` | Emphatic alveolar trill |
| `k` | `ç` | Spirantized to palatal fricative (blocked after homorganic nasals, /l/, /n/) |
| `g` | `ʝ` | Spirantized to palatal fricative |
| `b` | `β` | Spirantized (blocked after /m/) |
| `d` | `ð` | Spirantized (blocked after /n/, /l/) |
| `t` | `θ` | Spirantized (blocked after /n/, /m/, /l/ word-finally) |
| `x` | `χ` | Voiceless uvular fricative |
| `ɣɣ` | `qː` | Morphological alternation: geminate → stop |
| `xx` | `χː` | Geminate uvular fricative |
| `ww` | `wː` | Geminate labial-velar |
| `yy` | `jː` | Geminate palatal approximant |
| `tt` | `t͡s` | Geminate dental → affricate |

### Vowels
| Grapheme | Default | Backing / Allophony |
|----------|---------|---------------------|
| `a` | `æ` | `ɑ` near emphatics/uvulars |
| `i` | `i` | `ɪ` in closed syllables |
| `u` | `u` | `ʊ` in closed syllables |
| `e` | `ə` | Schwa (unstressed) |

### Gemination
All geminate consonants are transcribed with `ː` (e.g., `qq``qː`, `ll``lː`, `mm``mː`).

### Word Boundaries
The phoneme strings use **spaces** between phonemes. Words are separated by **spaces** (not `|` pipes, unlike VoxCommunis format).

---

## Sample Pairs

| Graphemes | Phonemes |
|-----------|----------|
| Yeqqim d igellil kra yedder. | `jəqːim ð iʝəlːil çræ jədːər` |
| Bḍan. | `βðˤæn` |
| Iɛedda lawan n wuẓu. | `iʕədːæ læwæn n wuzˤu` |
| Sami ikemmel awal. | `sæmi içəmːəl æwæl` |
| Tella tin i yeẓṛan kra? | `θəlːæ θin i jəzˤrˤɑn çræ` |
| Ikad sani leḥḥuɣ. | `içæð sæni ləħːuʁ` |
| Yella ḥedd i izemren ad y-iɛiwen? | `jəlːæ ħədː i izəmrən æð j iʕiwən` |
| Bezzaf meẓẓiyet, ulamek ara tezweǧ. | `βəzːæf məzˤːijəθ ulæməç æræ θəzwəd͡ʒ` |
| Teɛṛeḍ. | `θəʕrˤəðˤ` |
| Ur tɛawen ara. | `ur θʕæwən æræ` |

---

## Usage

### Loading with HuggingFace datasets
```python
from datasets import load_dataset

ds = load_dataset("boffire/kabyle-g2p-training-data", data_files="kab_g2p_train.tsv")
# or
# ds = load_dataset("boffire/kabyle-g2p-training-data", data_files="kab_g2p_train.jsonl")
```

### Loading as plain text
```python
# TSV
with open("kab_g2p_train.tsv", "r", encoding="utf-8") as f:
    for line in f:
        graphemes, phonemes = line.strip().split("\t")

# JSONL
import json
with open("kab_g2p_train.jsonl", "r", encoding="utf-8") as f:
    for line in f:
        obj = json.loads(line)
        graphemes = obj["graphemes"]
        phonemes = obj["phonemes"]
```

### Training a ByT5 G2P model
```python
from transformers import ByT5Tokenizer, T5ForConditionalGeneration

# Prefix format for ByT5 G2P
def format_input(text):
    return f"kab: {text}"

tokenizer = ByT5Tokenizer.from_pretrained("google/byt5-small")
model = T5ForConditionalGeneration.from_pretrained("google/byt5-small")

# Example
inputs = tokenizer(format_input("Yeqqim d igellil kra yedder."), return_tensors="pt")
labels = tokenizer("jəqːim ð iʝəlːil çræ jədːər", return_tensors="pt").input_ids

# Train...
```

---

## Limitations

### Spirantization of /k/

The phonemization of the grapheme **k** requires special attention in Kabyle. The current implementation applies the following rules:

| Context | Output | Example |
|---------|--------|---------|
| Default (word-initial, intervocalic, post-consonantal except blockers) | `ç` | *akal*`æçæl` |
| **Blocked** after homorganic nasals (`n`, `m`), `l`, `f`, `b`, `s`, `r`, `ḥ`, `c`, `ɛ` | `k` | *tamellalt*`θəməlːælt` (final `t` also blocked after `l`) |
| **Blocked** word-finally after `l` | `k` | — |

**Known edge cases:**
- Word-initial `/t/` may or may not spirantize — this requires further verification.
- The `/k/``ʃ` allophone (reported in some dialectal descriptions) is **not** implemented; only `ç` is produced.
- Loanwords with non-native clusters may produce unexpected outputs.

Users training G2P models on this data should be aware that the `/k/` spirantization blocking rules are based on the validated specification from July 2026 and may not cover all dialectal variants.

---

## Data Provenance

| Stage | Source |
|-------|--------|
| **Original text** | Tatoeba, Common Voice, and other Kabyle corpora |
| **Audio** | Resampled to 22.05 kHz mono for Piper TTS ([kabyle-piper-22khz](https://huggingface.co/datasets/boffire/kabyle-piper-22khz)) |
| **Phonemization** | [orthography2ipa](https://github.com/athmanemokraoui/orthography2ipa) (dev branch) — rule-based Kabyle G2P with allophony, sandhi, and stress |
| **Validation** | Zero errors across 59,462 utterances |

---

## Citation

If you use this dataset, please cite:

```bibtex
@dataset{kabyle_g2p_2026,
  author    = {Mokraoui, Athmane},
  title     = {Kabyle G2P Training Data},
  year      = {2026},
  publisher = {HuggingFace},
  url       = {https://huggingface.co/datasets/boffire/kabyle-g2p-training-data}
}
```

---

## Related Resources

| Resource | Link |
|----------|------|
| orthography2ipa (G2P engine) | https://github.com/TigreGotico/orthography2ipa |
| Source audio dataset | https://huggingface.co/datasets/boffire/kabyle-piper-22khz |
| Kabyle CV26 (cleaned speech) | https://huggingface.co/datasets/boffire/common-voice-scripted-speech-kab-26 |
| Kabyle TTS (Piper) | https://huggingface.co/datasets/boffire/kabyle-piper-22khz |

---

## Contact

**Athmane Mokraoui** (boffire)  
Maintainer of Kabyle NLP resources on HuggingFace.

---

*Generated on 2026-07-22*