Datasets:
Tasks:
Token Classification
Modalities:
Text
Formats:
json
Sub-tasks:
part-of-speech
Languages:
Kabyle
Size:
1M - 10M
License:
Upload folder using huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,74 +1,54 @@
|
|
| 1 |
---
|
| 2 |
-
language:
|
| 3 |
-
- kab
|
| 4 |
license: apache-2.0
|
| 5 |
-
|
| 6 |
-
-
|
| 7 |
-
|
| 8 |
-
-
|
| 9 |
-
|
| 10 |
-
-
|
| 11 |
-
- truecasing
|
| 12 |
-
- token-classification
|
| 13 |
-
- asr-post-processing
|
| 14 |
-
- low-resource
|
| 15 |
task_categories:
|
| 16 |
-
- token-classification
|
| 17 |
task_ids:
|
| 18 |
-
- part-of-speech
|
| 19 |
-
pretty_name: KabPunct
|
| 20 |
-
|
| 21 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
configs:
|
| 23 |
-
- config_name: default
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
- config_name: ood
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
---
|
| 36 |
|
| 37 |
# KabPunct
|
| 38 |
|
| 39 |
-
|
| 40 |
-
script)
|
| 41 |
-
follows each word (`NONE`, `COMMA`, `PERIOD`, `QUESTION`, `COLON`) and how the word is cased
|
| 42 |
-
(`LOWER`, `UPPER_INIT`).
|
| 43 |
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
| 45 |
[`agbalu/Belaid-31M`](https://huggingface.co/agbalu/Belaid-31M), which restores punctuation
|
| 46 |
-
at **0.793 macro-F1**
|
| 47 |
-
as far as we can establish, **the first labelled punctuation restoration corpus for Kabyle or
|
| 48 |
-
any Berber language.**
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
| split | config | rows | words | source |
|
| 53 |
-
|---|---|---|---|---|
|
| 54 |
-
| `train` | `default` | 1,262,922 | 12,101,835 | Text corpus + Common Voice train |
|
| 55 |
-
| `dev` | `default` | 5,597 | 29,280 | Common Voice dev, decontaminated |
|
| 56 |
-
| `test` | `default` | 5,160 | 26,969 | Common Voice test, decontaminated |
|
| 57 |
-
| `ood` | `ood` | 45,028 | 1,001,370 | Long-form prose (HCA), held out of training |
|
| 58 |
-
|
| 59 |
-
## Format
|
| 60 |
-
|
| 61 |
-
Each row has four fields:
|
| 62 |
-
|
| 63 |
-
| field | type | description |
|
| 64 |
-
|---|---|---|
|
| 65 |
-
| `words` | `list[str]` | Lowercased, unpunctuated word tokens — what an ASR system emits |
|
| 66 |
-
| `punctuation` | `list[str]` | Per-word punctuation label: `NONE`, `COMMA`, `PERIOD`, `QUESTION`, or `COLON` |
|
| 67 |
-
| `case` | `list[str]` | Per-word casing label: `LOWER` or `UPPER_INIT` |
|
| 68 |
-
| `source` | `str` | Provenance tag — which corpus this sentence came from |
|
| 69 |
-
|
| 70 |
-
Every list has the same length (one entry per word). The labels align to words, not subwords:
|
| 71 |
-
`words[i]` takes mark `punctuation[i]` and initial casing `case[i]`.
|
| 72 |
|
| 73 |
```python
|
| 74 |
from datasets import load_dataset
|
|
@@ -83,7 +63,6 @@ row = ds["train"][0]
|
|
| 83 |
# "source": "hf.abdelhaqueidali.kab-latn-tfng"
|
| 84 |
# }
|
| 85 |
|
| 86 |
-
# Reconstruct the original sentence from the labels
|
| 87 |
def restore(row):
|
| 88 |
mark_map = {"NONE": "", "COMMA": ",", "PERIOD": ".", "QUESTION": "?", "COLON": ":"}
|
| 89 |
parts = []
|
|
@@ -96,60 +75,93 @@ print(restore(row))
|
|
| 96 |
# "Tecfiḍ fell-i?"
|
| 97 |
```
|
| 98 |
|
| 99 |
-
##
|
| 100 |
|
| 101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
|
| 103 |
-
|
| 104 |
|
| 105 |
-
|
|
| 106 |
|---|---|---|
|
| 107 |
-
| `
|
| 108 |
-
| `
|
| 109 |
-
| `
|
| 110 |
-
| `
|
| 111 |
-
| `COLON` | `:` | 43 examples in test; support is low and the score should be quoted with that named |
|
| 112 |
|
| 113 |
-
|
|
|
|
| 114 |
|
| 115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
|
| 117 |
| label | meaning |
|
| 118 |
|---|---|
|
| 119 |
| `LOWER` | Word begins lowercase |
|
| 120 |
| `UPPER_INIT` | First character is uppercase (sentence-initial or proper noun) |
|
| 121 |
|
| 122 |
-
`ALL_CAPS` was a third class. It occurs once in dev and three times in test
|
| 123 |
-
|
| 124 |
-
|
|
|
|
| 125 |
|
| 126 |
## Decontamination
|
| 127 |
|
| 128 |
-
**58.2% of Common Voice Kabyle transcripts also appear in AƔBALU-Text v1**, because
|
| 129 |
-
Tatoeba sentences and Tatoeba is in the corpus. Every clip whose text
|
| 130 |
-
corpus is
|
| 131 |
-
used by `Belaid-31M`
|
| 132 |
-
in the `Belaid-31M`
|
| 133 |
|
| 134 |
-
A transcript
|
| 135 |
-
|
| 136 |
-
grammar. Training on them teaches transcriber style, not language.
|
| 137 |
|
| 138 |
`opus.nllb-kab` (871,663 records) is excluded from training entirely. Its record boundaries
|
| 139 |
-
were chosen by
|
| 140 |
-
sentence-final punctuation is
|
|
|
|
|
|
|
| 141 |
|
| 142 |
-
|
|
|
|
|
|
|
| 143 |
|
| 144 |
-
The `
|
| 145 |
-
|
| 146 |
-
construction; HCA records average 22 words across several sentences. The model's performance
|
| 147 |
-
degradation on `ood` (macro-F1 0.635 vs 0.793 on test) is documented in the `Belaid-31M`
|
| 148 |
-
card and explained there: it learned *one period at the end* from single-sentence training
|
| 149 |
-
examples, and that pattern breaks on multi-sentence prose.
|
| 150 |
|
| 151 |
-
|
| 152 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
|
| 154 |
## Reproduction
|
| 155 |
|
|
@@ -157,32 +169,30 @@ evaluated.
|
|
| 157 |
make punctuation TASK=corpus
|
| 158 |
```
|
| 159 |
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
## Limitations
|
| 164 |
|
| 165 |
-
|
| 166 |
-
established what two fluent readers agree on, so no figure here can be read as a fraction of
|
| 167 |
-
what is attainable. Comma placement in particular has no codified convention in Kabyle and
|
| 168 |
-
the corpus writers do not agree with each other.
|
| 169 |
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 174 |
|
| 175 |
## Licence
|
| 176 |
|
| 177 |
-
**Apache-2.0** for
|
| 178 |
-
licences:
|
| 179 |
|
| 180 |
-
- Common Voice clips:
|
| 181 |
-
- Text corpus: mixed
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
upstream licence.
|
| 187 |
|
| 188 |
Part of [AƔBALU](https://huggingface.co/agbalu), a Kabyle corpus and model collection.
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- kab
|
| 5 |
+
language_bcp47:
|
| 6 |
+
- kab-Latn
|
| 7 |
+
size_categories:
|
| 8 |
+
- 1M<n<10M
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
task_categories:
|
| 10 |
+
- token-classification
|
| 11 |
task_ids:
|
| 12 |
+
- part-of-speech
|
| 13 |
+
pretty_name: KabPunct — Kabyle punctuation and casing restoration corpus
|
| 14 |
+
tags:
|
| 15 |
+
- kabyle
|
| 16 |
+
- taqbaylit
|
| 17 |
+
- berber
|
| 18 |
+
- tamazight
|
| 19 |
+
- low-resource
|
| 20 |
+
- punctuation-restoration
|
| 21 |
+
- truecasing
|
| 22 |
+
- asr-post-processing
|
| 23 |
configs:
|
| 24 |
+
- config_name: default
|
| 25 |
+
data_files:
|
| 26 |
+
- split: train
|
| 27 |
+
path: default/train.jsonl
|
| 28 |
+
- split: dev
|
| 29 |
+
path: default/dev.jsonl
|
| 30 |
+
- split: test
|
| 31 |
+
path: default/test.jsonl
|
| 32 |
+
- config_name: ood
|
| 33 |
+
data_files:
|
| 34 |
+
- split: ood
|
| 35 |
+
path: ood/ood.jsonl
|
| 36 |
---
|
| 37 |
|
| 38 |
# KabPunct
|
| 39 |
|
| 40 |
+
A punctuation and capitalisation restoration corpus for Kabyle (Taqbaylit, `kab`, Latin
|
| 41 |
+
script), from the [AƔBALU](https://huggingface.co/agbalu) project.
|
|
|
|
|
|
|
| 42 |
|
| 43 |
+
**1,318,707 word-labelled sentences** drawn from the full AƔBALU-Text v1 corpus and
|
| 44 |
+
speaker-disjoint Common Voice Kabyle splits. Every sentence is broken into lowercased ASR
|
| 45 |
+
tokens with two parallel label sequences: which punctuation mark follows each word, and how
|
| 46 |
+
the word is capitalised. It is the training and evaluation corpus for
|
| 47 |
[`agbalu/Belaid-31M`](https://huggingface.co/agbalu/Belaid-31M), which restores punctuation
|
| 48 |
+
at **0.793 macro-F1** on the held-out `test` split.
|
|
|
|
|
|
|
| 49 |
|
| 50 |
+
It is, as far as we can establish, **the first labelled punctuation restoration corpus for
|
| 51 |
+
Kabyle or any Berber language.**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
```python
|
| 54 |
from datasets import load_dataset
|
|
|
|
| 63 |
# "source": "hf.abdelhaqueidali.kab-latn-tfng"
|
| 64 |
# }
|
| 65 |
|
|
|
|
| 66 |
def restore(row):
|
| 67 |
mark_map = {"NONE": "", "COMMA": ",", "PERIOD": ".", "QUESTION": "?", "COLON": ":"}
|
| 68 |
parts = []
|
|
|
|
| 75 |
# "Tecfiḍ fell-i?"
|
| 76 |
```
|
| 77 |
|
| 78 |
+
## Splits
|
| 79 |
|
| 80 |
+
| split | config | rows | words | description |
|
| 81 |
+
|---|---|---|---|---|
|
| 82 |
+
| `train` | `default` | 1,262,922 | 12,101,835 | Text corpus + Common Voice train |
|
| 83 |
+
| `dev` | `default` | 5,597 | 29,280 | Common Voice dev, decontaminated |
|
| 84 |
+
| `test` | `default` | 5,160 | 26,969 | Common Voice test, decontaminated |
|
| 85 |
+
| `ood` | `ood` | 45,028 | 1,001,370 | Long-form prose (HCA), held out of training entirely |
|
| 86 |
|
| 87 |
+
## Schema
|
| 88 |
|
| 89 |
+
| field | type | description |
|
| 90 |
|---|---|---|
|
| 91 |
+
| `words` | `list[str]` | Lowercased, unpunctuated word tokens — the form an ASR system emits |
|
| 92 |
+
| `punctuation` | `list[str]` | Per-word punctuation label: `NONE`, `COMMA`, `PERIOD`, `QUESTION`, or `COLON` |
|
| 93 |
+
| `case` | `list[str]` | Per-word casing label: `LOWER` or `UPPER_INIT` |
|
| 94 |
+
| `source` | `str` | Provenance tag: which corpus this sentence came from |
|
|
|
|
| 95 |
|
| 96 |
+
Every list is the same length (one entry per word). Labels align to words, not subwords:
|
| 97 |
+
`words[i]` takes mark `punctuation[i]` and initial casing `case[i]`.
|
| 98 |
|
| 99 |
+
## Label Scheme
|
| 100 |
+
|
| 101 |
+
### Punctuation
|
| 102 |
+
|
| 103 |
+
| label | character | support in `test` |
|
| 104 |
+
|---|---|---|
|
| 105 |
+
| `NONE` | — | 20,904 |
|
| 106 |
+
| `PERIOD` | `.` | 4,357 |
|
| 107 |
+
| `QUESTION` | `?` | 861 |
|
| 108 |
+
| `COMMA` | `,` | 804 |
|
| 109 |
+
| `COLON` | `:` | 43 |
|
| 110 |
+
|
| 111 |
+
`!` and `;` fold into `PERIOD`. Together they account for 0.41% of tokens, and the corpus
|
| 112 |
+
contains identical sentences under both marks — the distinction is not recoverable from text
|
| 113 |
+
alone, and collapsing them costs less than carrying a class that cannot be learned.
|
| 114 |
+
|
| 115 |
+
### Casing
|
| 116 |
|
| 117 |
| label | meaning |
|
| 118 |
|---|---|
|
| 119 |
| `LOWER` | Word begins lowercase |
|
| 120 |
| `UPPER_INIT` | First character is uppercase (sentence-initial or proper noun) |
|
| 121 |
|
| 122 |
+
`ALL_CAPS` was trialled as a third class. It occurs once in dev and three times in test —
|
| 123 |
+
too few to learn without spurious generalisation. The model that carried it emitted fourteen
|
| 124 |
+
all-capitals words for the three real ones. Restoring an acronym to full capitals is out
|
| 125 |
+
of scope, and the class is absent.
|
| 126 |
|
| 127 |
## Decontamination
|
| 128 |
|
| 129 |
+
**58.2% of Common Voice Kabyle transcripts also appear in AƔBALU-Text v1**, because the
|
| 130 |
+
majority are Tatoeba sentences and Tatoeba is in the corpus. Every clip whose text is found
|
| 131 |
+
in the text corpus is removed from `dev` and `test`. This simultaneously decontaminates the
|
| 132 |
+
`Masinissa-31M` encoder used by `Belaid-31M`, which was pretrained on the same file. The
|
| 133 |
+
rows in the `Belaid-31M` evaluation are unseen by both the punctuation heads and the backbone.
|
| 134 |
|
| 135 |
+
A transcript without a sentence-final mark is dropped rather than labelled `NONE`. Those
|
| 136 |
+
transcripts carry neither punctuation nor capitals — transcriber habit, not Kabyle grammar.
|
|
|
|
| 137 |
|
| 138 |
`opus.nllb-kab` (871,663 records) is excluded from training entirely. Its record boundaries
|
| 139 |
+
were chosen by a bitext miner rather than a writer; a record can end mid-sentence, and
|
| 140 |
+
sentence-final punctuation is the predicted label.
|
| 141 |
+
|
| 142 |
+
## Out-of-Domain Split (`ood`)
|
| 143 |
|
| 144 |
+
The `ood` split is `hf.imsidag.kabyle-corpus-hca` — 45,028 records of continuous long-form
|
| 145 |
+
Kabyle prose, held out of training entirely. Common Voice records are one sentence each;
|
| 146 |
+
HCA records average 22 words across several sentences.
|
| 147 |
|
| 148 |
+
The `Belaid-31M` card reports this split explicitly alongside `test`. A model evaluated only
|
| 149 |
+
in its training domain has not been evaluated.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
|
| 151 |
+
## Composition
|
| 152 |
+
|
| 153 |
+
| source id | type | train rows |
|
| 154 |
+
|---|---|---|
|
| 155 |
+
| `hf.abdelhaqueidali.kab-latn-tfng` | text corpus | 647,039 |
|
| 156 |
+
| `hf.imsidag.kabyle-corpus-ummto` | text corpus | 136,799 |
|
| 157 |
+
| `hf.imsidag.kabyle-raw-text` | text corpus | 121,338 |
|
| 158 |
+
| `hf.imsidag.kabyle-corpus-ubouira` | text corpus | 76,336 |
|
| 159 |
+
| `hf.boffire.kab-en-toponyms-sentences` | text corpus | 30,584 |
|
| 160 |
+
| `speech.train` | Common Voice 22.0 train | 151,100 |
|
| 161 |
+
| others (28 sources) | text corpus | 99,726 |
|
| 162 |
+
| `opus.nllb-kab` | **excluded** (miner-cut boundaries) | — |
|
| 163 |
+
|
| 164 |
+
The `ood` config contains `hf.imsidag.kabyle-corpus-hca` exclusively (45,028 rows).
|
| 165 |
|
| 166 |
## Reproduction
|
| 167 |
|
|
|
|
| 169 |
make punctuation TASK=corpus
|
| 170 |
```
|
| 171 |
|
| 172 |
+
Reads AƔBALU-Text v1 and the Common Voice speech splits, applies decontamination, and writes
|
| 173 |
+
the four files to `data/processed/punctuation/`.
|
|
|
|
|
|
|
| 174 |
|
| 175 |
+
## Citation
|
|
|
|
|
|
|
|
|
|
| 176 |
|
| 177 |
+
```bibtex
|
| 178 |
+
@misc{agbalu_kabpunct,
|
| 179 |
+
title = {KabPunct: a Kabyle punctuation and casing restoration corpus},
|
| 180 |
+
author = {AƔBALU},
|
| 181 |
+
year = {2026},
|
| 182 |
+
url = {https://huggingface.co/datasets/agbalu/KabPunct}
|
| 183 |
+
}
|
| 184 |
+
```
|
| 185 |
|
| 186 |
## Licence
|
| 187 |
|
| 188 |
+
**Apache-2.0** for the label annotations and the dataset release. The underlying sentences
|
| 189 |
+
retain their upstream licences:
|
| 190 |
|
| 191 |
+
- Common Voice train/dev/test clips: **CC0-1.0** (Mozilla Foundation).
|
| 192 |
+
- Text corpus sentences: **mixed** — see the composition table above. Every share-alike source
|
| 193 |
+
(`opus.nllb-kab`, ODbL-licensed rows) was excluded before publication. No row in any
|
| 194 |
+
published split imposes a redistribution obligation on downstream users.
|
| 195 |
+
- The label sequences (`punctuation`, `case`) are this project's annotation and are
|
| 196 |
+
**Apache-2.0**.
|
|
|
|
| 197 |
|
| 198 |
Part of [AƔBALU](https://huggingface.co/agbalu), a Kabyle corpus and model collection.
|