Datasets:
Add curated test items with scores; card update
Browse files- README.md +104 -15
- data/test.jsonl.gz +2 -2
- data/train.jsonl.gz +2 -2
README.md
CHANGED
|
@@ -4,6 +4,38 @@ tags: [african-languages, code-switching, idioms, benchmark, synthetic]
|
|
| 4 |
license: other
|
| 5 |
language: [afr, amh, bam, ewe, fon, ful, gpe, hau, ibo, kik, kin, kon, lin, lug, luo, mlg, nde, nso, nya, orm, pcm, run, sna, som, sot, ssw, swh, tir, tsn, tso, tum, twi, wes, wol, xho, yor, zul, en]
|
| 6 |
task_categories: [text-generation]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
configs:
|
| 8 |
- config_name: default
|
| 9 |
data_files:
|
|
@@ -15,7 +47,7 @@ configs:
|
|
| 15 |
|
| 16 |
# African Code-Switch Benchmark
|
| 17 |
|
| 18 |
-
A dataset for code-switching and idiom-rich writing in 37 African languages. Every row is
|
| 19 |
|
| 20 |
Two rewrite tasks:
|
| 21 |
|
|
@@ -24,20 +56,24 @@ Two rewrite tasks:
|
|
| 24 |
|
| 25 |
## Train and test
|
| 26 |
|
| 27 |
-
| Split | English texts | Rows | `hm` rows | `ood` rows | Candidates |
|
| 28 |
-
|---|---|---|---|---|---|
|
| 29 |
-
| `train` | 8,919 | 17,794 | 8,875 | 8,919 | 142,352 |
|
| 30 |
-
| `test` | 11,100 | 22,147 | 11,048 | 11,099 | 177,176 |
|
|
|
|
| 31 |
|
| 32 |
-
|
| 33 |
|
| 34 |
-
**`
|
| 35 |
|
| 36 |
-
**
|
|
|
|
| 37 |
|
| 38 |
-
|
| 39 |
|
| 40 |
-
|
|
|
|
|
|
|
| 41 |
|
| 42 |
## What you can use it for
|
| 43 |
|
|
@@ -54,17 +90,22 @@ Each line is one (English text, task) pair.
|
|
| 54 |
|
| 55 |
| Field | Meaning |
|
| 56 |
|---|---|
|
| 57 |
-
| `id` | id of the
|
|
|
|
| 58 |
| `task` | `hm` (code-switching) or `ood` (idiom-rich rewrite) |
|
|
|
|
|
|
|
| 59 |
| `lang`, `switch` | base language code; switch language code (`hm` only, otherwise `null`) |
|
| 60 |
| `pair_in_training_table` | `false` for the 3,348 `hm` rows whose base-switch pair is outside the 67 pairs our 1B model was trained on (see the pair table); `true` otherwise |
|
| 61 |
| `prompt` | the exact prompt given to the model, for example `<hm> <kon>+<fra>: Hey there! ...` |
|
| 62 |
-
| `
|
|
|
|
|
|
|
| 63 |
| `source_dataset`, `source_register` | where the English text comes from, and its register (`chat`, `story`, `complex`) |
|
| 64 |
| `candidates` | the candidates, described below |
|
| 65 |
| `output` | the cleaned text of each candidate, in the same order as `candidates`: language tags and the `<dev>...</dev>` block removed, so you can use it directly |
|
| 66 |
|
| 67 |
-
Each candidate has `k` (0 is the greedy output, 1 and up are samples), `greedy`, `text` (the raw output with tags and device block), `finished` (stopped by itself, not cut off), `devices` (the switched phrases or idioms), `final` (the text without tags and device block), `format_ok` (one device block and a non-empty finished text) and `ev` (a learned quality score,
|
| 68 |
|
| 69 |
Example row, shortened:
|
| 70 |
|
|
@@ -98,9 +139,9 @@ for r in ds["test"]:
|
|
| 98 |
|
| 99 |
## Statistics
|
| 100 |
|
| 101 |
-
Rows are (English text, task) pairs; every text has an `hm` and an `ood` row (a few
|
| 102 |
|
| 103 |
-
**Overall.** 20,019 English texts, 39,941 rows, 319,528 candidates, 37 base languages, 81 base-switch pairs. The mean quality score `ev` of a valid candidate is 4.12 (train 4.12, test 4.12); `ev` comes from a learned model, not from people.
|
| 104 |
|
| 105 |
**English source texts.** The texts keep the licences of their sources (see License). Rows by source:
|
| 106 |
|
|
@@ -240,6 +281,54 @@ Rows are (English text, task) pairs; every text has an `hm` and an `ood` row (a
|
|
| 240 |
| Zulu | `zul` | Afrikaans | `afr` | 125 | 155 | 280 | no |
|
| 241 |
| Zulu | `zul` | English | `eng` | 116 | 145 | 261 | yes |
|
| 242 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 243 |
## Supported prompt formats
|
| 244 |
|
| 245 |
Prompts use the formats `<hm> <base>+<switch>: TEXT` and `<ood> <base>: TEXT`, with the three-letter language codes in angle brackets and two spaces after the colon.
|
|
|
|
| 4 |
license: other
|
| 5 |
language: [afr, amh, bam, ewe, fon, ful, gpe, hau, ibo, kik, kin, kon, lin, lug, luo, mlg, nde, nso, nya, orm, pcm, run, sna, som, sot, ssw, swh, tir, tsn, tso, tum, twi, wes, wol, xho, yor, zul, en]
|
| 6 |
task_categories: [text-generation]
|
| 7 |
+
dataset_info:
|
| 8 |
+
features:
|
| 9 |
+
- {name: id, dtype: string}
|
| 10 |
+
- {name: subset, dtype: string}
|
| 11 |
+
- {name: task, dtype: string}
|
| 12 |
+
- {name: task_type, dtype: string}
|
| 13 |
+
- {name: input_type, dtype: string}
|
| 14 |
+
- {name: lang, dtype: string}
|
| 15 |
+
- {name: switch, dtype: string}
|
| 16 |
+
- {name: pair_in_training_table, dtype: bool}
|
| 17 |
+
- {name: prompt, dtype: string}
|
| 18 |
+
- {name: input, dtype: string}
|
| 19 |
+
- {name: english, dtype: string}
|
| 20 |
+
- {name: source_dataset, dtype: string}
|
| 21 |
+
- {name: source_register, dtype: string}
|
| 22 |
+
- {name: reference, dtype: string}
|
| 23 |
+
- name: candidates
|
| 24 |
+
list:
|
| 25 |
+
- {name: k, dtype: int64}
|
| 26 |
+
- {name: greedy, dtype: bool}
|
| 27 |
+
- {name: text, dtype: string}
|
| 28 |
+
- {name: finished, dtype: bool}
|
| 29 |
+
- name: devices
|
| 30 |
+
list: string
|
| 31 |
+
- {name: final, dtype: string}
|
| 32 |
+
- {name: format_ok, dtype: bool}
|
| 33 |
+
- {name: ev, dtype: float64}
|
| 34 |
+
- {name: system, dtype: string}
|
| 35 |
+
- {name: reward, dtype: float64}
|
| 36 |
+
- {name: chrf, dtype: float64}
|
| 37 |
+
- name: output
|
| 38 |
+
list: string
|
| 39 |
configs:
|
| 40 |
- config_name: default
|
| 41 |
data_files:
|
|
|
|
| 47 |
|
| 48 |
# African Code-Switch Benchmark
|
| 49 |
|
| 50 |
+
A dataset for code-switching and idiom-rich writing in 37 African languages. Every row is a prompt (English text, or text in the base language) with candidate rewrites and a cleaned `output` column you can use directly. The `test` split is meant to become the benchmark for measuring progress on African-language code-switching, and the `train` split is for building better models. Nobody has checked the candidates with native speakers yet.
|
| 51 |
|
| 52 |
Two rewrite tasks:
|
| 53 |
|
|
|
|
| 56 |
|
| 57 |
## Train and test
|
| 58 |
|
| 59 |
+
| Split | Subset | English texts or items | Rows | `hm` rows | `ood` rows | Candidates |
|
| 60 |
+
|---|---|---|---|---|---|---|
|
| 61 |
+
| `train` | generated | 8,919 | 17,794 | 8,875 | 8,919 | 142,352 |
|
| 62 |
+
| `test` | generated | 11,100 | 22,147 | 11,048 | 11,099 | 177,176 |
|
| 63 |
+
| `test` | curated | 6,230 | 6,230 | 2,380 | 3,850 | 18,675 |
|
| 64 |
|
| 65 |
+
The `subset` column tells the two kinds of rows apart.
|
| 66 |
|
| 67 |
+
**`test` is the benchmark.** It has two parts:
|
| 68 |
|
| 69 |
+
- **`generated`**: 11,100 English texts, **exactly 300 per language** (37 languages), so no language counts more than another when you average scores. Every text has an `hm` and an `ood` row with eight candidates written by our 1B model (`AletheiaAING/gemma-3-1b-csw-best`). The language pairs and text types follow the same mix as `train` (under 1% difference on source mix, under 0.5% on language pairs), and all 81 base-switch pairs appear, with 66 to 166 `hm` rows each.
|
| 70 |
+
- **`curated`**: 6,230 held-out items in 34 languages and five tasks (`eng_hm`, `m_hm`, `eng_ood`, `m_ood`, `hm_ood`, explained under Fields). Each item has a curated `reference` and the outputs of three csw systems with their scores: `ev` (a learned quality score), `reward` (a rule-and-quality reward) and `chrf` (chrF++ against the reference).
|
| 71 |
|
| 72 |
+
Report scores per language as well as the average.
|
| 73 |
|
| 74 |
+
**`train`** holds the remaining 8,919 generated texts.
|
| 75 |
+
|
| 76 |
+
**How the split was made.** The split is by English text, so the `hm` and `ood` rows of one text always stay together. Near-duplicate texts (for example conversations that share most of their sentences) are kept on the same side, so the model never sees a near copy of a test text during training. Texts were sampled per language to match the overall mix of switch-language pairs and text types.
|
| 77 |
|
| 78 |
## What you can use it for
|
| 79 |
|
|
|
|
| 90 |
|
| 91 |
| Field | Meaning |
|
| 92 |
|---|---|
|
| 93 |
+
| `id` | id of the item; for `generated` rows the `hm` and `ood` rows of one text share it |
|
| 94 |
+
| `subset` | `generated` or `curated` (see Train and test) |
|
| 95 |
| `task` | `hm` (code-switching) or `ood` (idiom-rich rewrite) |
|
| 96 |
+
| `task_type` | the full task name: `eng_hm`, `m_hm`, `eng_ood`, `m_ood` or `hm_ood`. `eng_` means the input is English, `m_` that it is already in the base language, and `hm_ood` that it is already code-switched and you want the idiom-rich version. `generated` rows are all `eng_hm` or `eng_ood`. |
|
| 97 |
+
| `input_type` | `english`, `base_language` or `code_switched` |
|
| 98 |
| `lang`, `switch` | base language code; switch language code (`hm` only, otherwise `null`) |
|
| 99 |
| `pair_in_training_table` | `false` for the 3,348 `hm` rows whose base-switch pair is outside the 67 pairs our 1B model was trained on (see the pair table); `true` otherwise |
|
| 100 |
| `prompt` | the exact prompt given to the model, for example `<hm> <kon>+<fra>: Hey there! ...` |
|
| 101 |
+
| `input` | the text the model receives |
|
| 102 |
+
| `english` | the English source text (`null` when the input is not English) |
|
| 103 |
+
| `reference` | the curated reference text (`curated` rows only, `null` otherwise) |
|
| 104 |
| `source_dataset`, `source_register` | where the English text comes from, and its register (`chat`, `story`, `complex`) |
|
| 105 |
| `candidates` | the candidates, described below |
|
| 106 |
| `output` | the cleaned text of each candidate, in the same order as `candidates`: language tags and the `<dev>...</dev>` block removed, so you can use it directly |
|
| 107 |
|
| 108 |
+
Each candidate has `k` (0 is the greedy output, 1 and up are samples), `greedy`, `text` (the raw output with tags and device block), `finished` (stopped by itself, not cut off), `devices` (the switched phrases or idioms), `final` (the text without tags and device block), `format_ok` (one device block and a non-empty finished text) and `ev` (a learned quality score, `null` when missing), and for `curated` rows also `system` (`sft`, `rl_best` or `rl_last`), `reward` and `chrf`. Fields that don't apply are `null`. Use `output[i]` for the text of `candidates[i]`.
|
| 109 |
|
| 110 |
Example row, shortened:
|
| 111 |
|
|
|
|
| 139 |
|
| 140 |
## Statistics
|
| 141 |
|
| 142 |
+
Rows are (English text, task) pairs; every generated text has an `hm` and an `ood` row (a few have only one). The tables below describe the generated subset, except the curated tables at the end.
|
| 143 |
|
| 144 |
+
**Overall.** 20,019 generated English texts, 39,941 rows, 319,528 candidates, 37 base languages, 81 base-switch pairs, plus 6,230 curated test items. The mean quality score `ev` of a valid candidate is 4.12 (train 4.12, test 4.12); `ev` comes from a learned model, not from people.
|
| 145 |
|
| 146 |
**English source texts.** The texts keep the licences of their sources (see License). Rows by source:
|
| 147 |
|
|
|
|
| 281 |
| Zulu | `zul` | Afrikaans | `afr` | 125 | 155 | 280 | no |
|
| 282 |
| Zulu | `zul` | English | `eng` | 116 | 145 | 261 | yes |
|
| 283 |
|
| 284 |
+
**Curated test items by language and task** (`test`, `subset = curated`).
|
| 285 |
+
|
| 286 |
+
| Language | Code | eng_hm | m_hm | eng_ood | m_ood | hm_ood | total |
|
| 287 |
+
|---|---|---|---|---|---|---|---|
|
| 288 |
+
| Afrikaans | `afr` | 100 | 100 | 99 | 99 | 99 | 497 |
|
| 289 |
+
| Amharic | `amh` | 99 | 99 | 97 | 97 | 97 | 489 |
|
| 290 |
+
| Bambara | `bam` | 2 | 2 | 2 | 2 | 2 | 10 |
|
| 291 |
+
| Cameroonian Pidgin | `wes` | 1 | 1 | 72 | 72 | 1 | 147 |
|
| 292 |
+
| Chichewa | `nya` | 52 | 52 | 53 | 53 | 51 | 261 |
|
| 293 |
+
| Fon | `fon` | 8 | 8 | 10 | 10 | 8 | 44 |
|
| 294 |
+
| Ghanaian Pidgin | `gpe` | 2 | 2 | 71 | 71 | 1 | 147 |
|
| 295 |
+
| Hausa | `hau` | 74 | 74 | 99 | 99 | 74 | 420 |
|
| 296 |
+
| Igbo | `ibo` | 21 | 21 | 25 | 25 | 21 | 113 |
|
| 297 |
+
| Kikuyu | `kik` | 30 | 30 | 25 | 25 | 25 | 135 |
|
| 298 |
+
| Kinyarwanda | `kin` | 9 | 9 | 9 | 9 | 9 | 45 |
|
| 299 |
+
| Kirundi | `run` | 5 | 5 | 5 | 5 | 5 | 25 |
|
| 300 |
+
| Kongo | `kon` | 4 | 4 | 6 | 6 | 3 | 23 |
|
| 301 |
+
| Lingala | `lin` | 5 | 5 | 6 | 6 | 5 | 27 |
|
| 302 |
+
| Luo | `luo` | 11 | 11 | 10 | 10 | 10 | 52 |
|
| 303 |
+
| Malagasy | `mlg` | 84 | 84 | 91 | 91 | 79 | 429 |
|
| 304 |
+
| Nigerian Pidgin | `pcm` | 74 | 74 | 90 | 90 | 74 | 402 |
|
| 305 |
+
| North Ndebele | `nde` | 99 | 99 | 74 | 74 | 73 | 419 |
|
| 306 |
+
| Oromo | `orm` | 27 | 27 | 27 | 27 | 27 | 135 |
|
| 307 |
+
| Sepedi | `nso` | 37 | 37 | 37 | 37 | 37 | 185 |
|
| 308 |
+
| Sesotho | `sot` | 23 | 23 | 22 | 22 | 22 | 112 |
|
| 309 |
+
| Setswana | `tsn` | 25 | 25 | 25 | 25 | 25 | 125 |
|
| 310 |
+
| Shona | `sna` | 23 | 23 | 23 | 23 | 23 | 115 |
|
| 311 |
+
| Somali | `som` | 91 | 91 | 92 | 92 | 90 | 456 |
|
| 312 |
+
| Swahili | `swh` | 95 | 95 | 99 | 99 | 93 | 481 |
|
| 313 |
+
| Swati | `ssw` | 45 | 45 | 43 | 43 | 41 | 217 |
|
| 314 |
+
| Tigrinya | `tir` | 15 | 15 | 14 | 14 | 14 | 72 |
|
| 315 |
+
| Tsonga | `tso` | 21 | 21 | 20 | 20 | 20 | 102 |
|
| 316 |
+
| Tumbuka | `tum` | 35 | 35 | 33 | 33 | 32 | 168 |
|
| 317 |
+
| Twi | `twi` | 5 | 5 | 11 | 11 | 5 | 37 |
|
| 318 |
+
| Wolof | `wol` | 13 | 13 | 14 | 14 | 13 | 67 |
|
| 319 |
+
| Xhosa | `xho` | 15 | 15 | 15 | 15 | 14 | 74 |
|
| 320 |
+
| Yoruba | `yor` | 31 | 31 | 31 | 31 | 30 | 154 |
|
| 321 |
+
| Zulu | `zul` | 9 | 9 | 9 | 9 | 9 | 45 |
|
| 322 |
+
| **Total** | | 1190 | 1190 | 1359 | 1359 | 1132 | 6230 |
|
| 323 |
+
|
| 324 |
+
**Scores of the three systems on the curated items** (mean over 6,230 items; `ev` and `reward` come from learned models and rules, not from people).
|
| 325 |
+
|
| 326 |
+
| `system` | what it is | items | `ev` | `chrf` |
|
| 327 |
+
|---|---|---|---|---|
|
| 328 |
+
| `sft` | supervised | 6,225 | 3.53 | 43.9 |
|
| 329 |
+
| `rl_best` | reinforcement-learned, best checkpoint | 6,225 | 3.75 | 43.5 |
|
| 330 |
+
| `rl_last` | reinforcement-learned, last checkpoint | 6,225 | 3.73 | 43.5 |
|
| 331 |
+
|
| 332 |
## Supported prompt formats
|
| 333 |
|
| 334 |
Prompts use the formats `<hm> <base>+<switch>: TEXT` and `<ood> <base>: TEXT`, with the three-letter language codes in angle brackets and two spaces after the colon.
|
data/test.jsonl.gz
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:50451bb639423a5605a65171a074f41aecc87b317f84c2a0dcacfb68841d17ce
|
| 3 |
+
size 42844020
|
data/train.jsonl.gz
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5b02433866e008fb96bd9136359e4f1e6c52fcbf847d9a3024d67363d14b8b20
|
| 3 |
+
size 29295815
|