File size: 9,630 Bytes
8dde12b
3ce2ad0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8dde12b
3ce2ad0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
language:
- sba
- fr
language_details: "sba_Latn, fra_Latn"
pretty_name: "sba-Fr: Ngambay–French Parallel Corpus"
license: other
license_name: sba-fr-research-use
license_link: LICENSE
task_categories:
- translation
multilinguality:
- translation
size_categories:
- 10K<n<100K
source_datasets:
- original
tags:
- ngambay
- chad
- low-resource
- african-languages
- machine-translation
- bible
- masakhane
configs:
- config_name: original
  default: true
  data_files:
  - split: train
    path: data/original/train.parquet
  - split: validation
    path: data/original/validation.parquet
  - split: test
    path: data/original/test.parquet
- config_name: original_plus_synthetic
  data_files:
  - split: train
    path: data/original_plus_synthetic/train.parquet
  - split: validation
    path: data/original_plus_synthetic/validation.parquet
  - split: test
    path: data/original_plus_synthetic/test.parquet
dataset_info:
- config_name: original
  features:
  - name: id
    dtype: string
  - name: sba
    dtype: string
  - name: fr
    dtype: string
  - name: source
    dtype: string
  splits:
  - name: train
    num_examples: 21166
  - name: validation
    num_examples: 6615
  - name: test
    num_examples: 5292
- config_name: original_plus_synthetic
  features:
  - name: id
    dtype: string
  - name: sba
    dtype: string
  - name: fr
    dtype: string
  - name: source
    dtype: string
  splits:
  - name: train
    num_examples: 24366
  - name: validation
    num_examples: 7615
  - name: test
    num_examples: 6092
---

# sba-Fr: Ngambay–French Parallel Corpus

**sba-Fr** is the first public parallel corpus between **Ngambay** (ISO 639-3 `sba`) and **French**. Ngambay is a Sara (Central Sudanic) language spoken mainly in southern Chad (Logone Occidental, Logone Oriental, Tandjilé, Mayo-Kebbi) and northern Cameroon, and is used as a lingua franca across southwestern Chad.

The corpus contains **33,073 human-produced sentence pairs**, plus an optional set of **5,000 machine-generated (synthetic) pairs**. It was released with the paper *Ngambay-French Neural Machine Translation (sba-Fr)* (NLP4TIA workshop at RANLP 2023), where M2M100, ByT5 and mT5 were fine-tuned on it.

- **Paper:** [ACL Anthology 2023.nlp4tia-1.6](https://aclanthology.org/2023.nlp4tia-1.6) · [arXiv:2308.13497](https://arxiv.org/abs/2308.13497)
- **Code & raw files:** [GitHub – Toadoum/Ngambay-French-Neural-Machine-Translation-sba_fr_v1-](https://github.com/Toadoum/Ngambay-French-Neural-Machine-Translation-sba_fr_v1-)
- **Curated by:** Sakayo Toadoum Sari, Angela Fan, Lema Logamou Seknewna
- **Point of contact:** Sakayo Toadoum Sari

## Quick start

```python
from datasets import load_dataset

ds = load_dataset("Toadoum/ngambay-french-sba-fr")                       # config "original" (default)
ds_syn = load_dataset("Toadoum/ngambay-french-sba-fr", "original_plus_synthetic")

print(ds["train"][0])
# {'id': 'original-train-00000', 'sba': '18Yeḛ gə́ iya dɔ kḛji loo ...', 'fr': '18 Celui qui dissimule la haine ...', 'source': 'bible'}
```

## Configurations

| Config | train | validation | test | Contents |
|---|---:|---:|---:|---|
| `original` (default) | 21,166 | 6,615 | 5,292 | Human-produced pairs only. Exact splits used in the paper (Table 1). |
| `original_plus_synthetic` | 24,366 | 7,615 | 6,092 | The 33,073 original pairs **re-shuffled** together with 5,000 synthetic pairs. Exact splits used in the paper (Table 2). |

> ⚠️ **The two configs use different splits.** About 64% of the `original` test set (3,397 / 5,292 pairs) appears in the `original_plus_synthetic` **train** split. Never train on one config and evaluate on the other.

## Data fields

| Field | Type | Description |
|---|---|---|
| `id` | string | Stable row identifier (`<config>-<split>-<index>`). |
| `sba` | string | Ngambay text. |
| `fr` | string | French text. |
| `source` | string | `bible`, `dictionary` or `synthetic` (see below). |

### Composition by source

| Source | original | original_plus_synthetic | Description |
|---|---:|---:|---|
| `bible` | 31,897 | 31,897 | Verse-aligned pairs scraped from YouVersion (Ngambay Bible ↔ French Louis Segond). |
| `dictionary` | 1,176 | 1,176 | Everyday sentences created manually from the *Sara Bagirmi Languages Project* Ngambay–French dictionary (5th ed., 2015). |
| `synthetic` | – | 5,000 | French news sentences (Leipzig Corpora Collection, `fra_news_2022_100K`) translated into Ngambay by the paper's fine-tuned M2M100 model. |

## Dataset creation

**Bible data.** Parallel verses were scraped from YouVersion with R (`Dataset/bible_scrapping.Rmd` in the GitHub repo). The Ngambay translation does not cover every verse of the French version, and the raw scrape contained errors, incomplete translations and duplicates. Native speakers and linguists, including members of the association translating the Bible from French into Ngambay in Chad, reviewed the data; inconsistent and incomplete pairs were dropped.

**Dictionary data.** 1,176 short-to-medium everyday sentences were entered manually (via a Google Form) from the Ngambay–French dictionary of the Sara Bagirmi Languages Project.

**Synthetic data.** Following forward translation / self-training (Sennrich et al., 2016; He et al., 2020), the best model trained on the original data (M2M100) translated French monolingual news sentences into Ngambay. The Ngambay side of these pairs is **model output, not human translation**, and has not been verified by speakers.

**Split.** The original corpus was split roughly 64/20/16 into train/validation/test.

## Differences from the GitHub release

This Hub version is the same data, with the following changes:

1. **Language key renamed `sw` → `sba`.** In the GitHub JSON files the Ngambay side is stored under `sw` (Swahili) because Swahili was used as the proxy language code when fine-tuning M2M100/mT5/ByT5. The text itself is Ngambay.
2. **Leipzig sentence IDs removed** from the French side of synthetic rows (e.g. `"1895\tAlep-Sana/ …"` → `"Alep-Sana/ …"`).
3. **`source` column added**, derived from the data: synthetic = not present in the original corpus; bible = French side starts with a verse number; dictionary = the rest (exactly 1,176 rows, matching the paper).
4. **Not included:** `sba_fr_JSON/*_synthetic.json` in the GitHub repo, which adds 1,574 non-Bible pairs whose provenance is not documented in the paper. The splits from `Dataset/*_sy.json` (the ones matching the paper's Table 2) are used instead.

The text is otherwise **unmodified**, so results remain comparable with the paper.

## Known issues and limitations

- **Domain bias.** ~96% of the human-produced data is biblical. Expect archaic register, religious vocabulary, and weak coverage of modern topics.
- **Verse numbers kept in the text.** Bible rows begin with the verse number on both sides (`"18 Celui qui…"` / `"18Yeḛ gə́…"`; no space on the Ngambay side). Strip them with `re.sub(r'^\d+\s*', '', text)` for most uses, and do so consistently for both training and evaluation.
- **Partial alignments.** Some Ngambay verses are shorter than their French counterpart because verse boundaries differ between translations. About 1,790 training pairs have a Ngambay/French word ratio below 0.3.
- **Orthographic inconsistency.** Dictionary rows use a tone-marked orthography (e.g. `gɨ́`, `ɗ`, `ā`), while Bible rows use the church orthography (e.g. `gə́`, `d’`, without systematic tone marking). Normalise to NFC and be aware that the same word may appear in both spellings.
- **Duplicates and overlap.** A few exact duplicates exist within splits (≤55 per split) and a small number of pairs/source sentences occur in both train and test (13 identical pairs, 130 shared Ngambay sentences in `original`).
- **Synthetic rows in evaluation splits.** In `original_plus_synthetic`, validation and test also contain synthetic rows (967 and 781). Scores on these splits partly measure agreement with an earlier model's output. For a clean evaluation, filter with `ds["test"].filter(lambda x: x["source"] != "synthetic")`.

## Licensing

The data is released **for research and non-commercial use**.

- The code and curation in the GitHub repository are MIT-licensed, but that licence does not cover third-party text.
- **French Bible text** (Louis Segond 1910) is in the public domain.
- **Ngambay Bible text** was obtained from YouVersion; copyright remains with its publisher. Users must check the publisher's terms before any commercial use or redistribution.
- **Synthetic rows** derive from the Leipzig Corpora Collection; see its terms of use.
- **Dictionary rows** were created by the authors from the Sara Bagirmi Languages Project dictionary.

## Citation

```bibtex
@inproceedings{toadoum-sari-etal-2023-ngambay,
    title     = "{N}gambay-{F}rench Neural Machine Translation (sba-{F}r)",
    author    = "Toadoum Sari, Sakayo and Fan, Angela and Seknewna, Lema Logamou",
    booktitle = "Proceedings of the First Workshop on NLP Tools and Resources for Translation and Interpreting Applications",
    month     = sep,
    year      = "2023",
    address   = "Varna, Bulgaria",
    publisher = "INCOMA Ltd., Shoumen, Bulgaria",
    url       = "https://aclanthology.org/2023.nlp4tia-1.6",
    pages     = "39--47",
}
```

## Acknowledgements

This work was carried out at AIMS / AMMI (African Master's in Machine Intelligence) and supported by a Google Cloud Platform grant, as part of the Masakhane community effort for African-language MT. We thank the Ngambay speakers and Bible translators who reviewed the data.