Datasets:
Tasks:
Translation
Modalities:
Text
Formats:
csv
Size:
100K - 1M
Tags:
translation
machine-translation
low-resource
endangered-languages
formosan-languages
leakage-controlled
License:
Update public MT corpus with leakage-controlled hard splits
Browse files- README.md +154 -271
- formosan_en_hf.csv +2 -2
- formosan_zh_hf.csv +2 -2
README.md
CHANGED
|
@@ -2,326 +2,209 @@
|
|
| 2 |
pretty_name: FormosanBank Machine Translation
|
| 3 |
license: cc-by-4.0
|
| 4 |
task_categories:
|
| 5 |
-
|
| 6 |
language:
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
- en
|
| 25 |
-
- zh
|
| 26 |
size_categories:
|
| 27 |
-
|
| 28 |
tags:
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
|
|
|
| 35 |
library_name: datasets
|
| 36 |
configs:
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
-
|
| 40 |
-
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
| 42 |
---
|
| 43 |
-
# FormosanBank Machine Translation
|
| 44 |
-
|
| 45 |
-
Parallel corpora for 15 Indigenous Formosan languages aligned to English and Mandarin Chinese, prepared for use with the Hugging Face `datasets` library.
|
| 46 |
-
|
| 47 |
-
The dataset aggregates processed sentence- and phrase-level corpora into two CSV files:
|
| 48 |
-
|
| 49 |
-
- **Formosan → English** (`formosan_en_hf.csv`)
|
| 50 |
-
- **Formosan → Chinese** (`formosan_zh_hf.csv`)
|
| 51 |
-
|
| 52 |
-
Each row is a single bilingual sentence pair with language, dialect, split, and provenance metadata. The dataset is designed for training and evaluating neural machine translation (NMT) and related models for low-resource Formosan languages.
|
| 53 |
-
|
| 54 |
-
> **IMPORTANT DISCLAIMER:**
|
| 55 |
-
> Our Machine Translation models published on HuggingFace and in our papers were trained on this data in addition to private data not available to the public due to content restrictions.
|
| 56 |
-
>
|
| 57 |
-
---
|
| 58 |
-
|
| 59 |
-
## Dataset Summary
|
| 60 |
-
|
| 61 |
-
- **Total sentence pairs:** 393,634
|
| 62 |
-
- **Formosan → English:** 85,144
|
| 63 |
-
- **Formosan → Chinese:** 308,490
|
| 64 |
-
- **Languages (15):** Amis, Bunun, Kavalan, Rukai, Paiwan, Puyuma, Thao, Saaroa, Sakizaya, Yami/Tao, Atayal, Seediq/Truku, Tsou, Kanakanavu, Saisiyat
|
| 65 |
-
- **Targets:** English (`en`), Mandarin Chinese (`zh`)
|
| 66 |
-
- **Splits (all languages, both targets combined):**
|
| 67 |
-
- Train: 334,772
|
| 68 |
-
- Validate: 29,412
|
| 69 |
-
- Test: 29,450
|
| 70 |
-
- **License:** CC BY 4.0
|
| 71 |
-
- **Format:** UTF-8 CSV, one sentence pair per row
|
| 72 |
-
|
| 73 |
-
The dataset is intended to support research on low-resource MT, cross-lingual transfer, and documentation of endangered Formosan languages.
|
| 74 |
-
|
| 75 |
-
---
|
| 76 |
-
|
| 77 |
-
## Supported Tasks and Use Cases
|
| 78 |
-
|
| 79 |
-
**Primary task**
|
| 80 |
-
|
| 81 |
-
- `translation`
|
| 82 |
-
- Formosan language → English
|
| 83 |
-
- Formosan language → Chinese
|
| 84 |
-
|
| 85 |
-
**Example use cases**
|
| 86 |
-
|
| 87 |
-
- Training NMT systems (e.g. NLLB / encoder–decoder models) for individual Formosan languages.
|
| 88 |
-
- Cross-lingual pretraining and evaluation for multilingual models.
|
| 89 |
-
- Dialect-aware MT experiments using the `dialect` field.
|
| 90 |
-
- Lexicon / dictionary-style MT from short phrases and headwords.
|
| 91 |
-
|
| 92 |
-
---
|
| 93 |
-
|
| 94 |
-
## Languages and Coverage
|
| 95 |
-
|
| 96 |
-
High-level sentence counts per language (summing both directions: Formosan→English and Formosan→Chinese):
|
| 97 |
-
|
| 98 |
-
| Language | Formosan→English | Formosan→Chinese | Total |
|
| 99 |
-
|---------------|------------------|------------------|--------|
|
| 100 |
-
| Amis | 10,523 | 30,646 | 41,169 |
|
| 101 |
-
| Bunun | 9,006 | 30,878 | 39,884 |
|
| 102 |
-
| Kavalan | 2,098 | 14,682 | 16,780 |
|
| 103 |
-
| Rukai | 11,850 | 39,360 | 51,210 |
|
| 104 |
-
| Paiwan | 9,806 | 24,015 | 33,821 |
|
| 105 |
-
| Puyuma | 7,199 | 26,154 | 33,353 |
|
| 106 |
-
| Thao | 2,086 | 11,633 | 13,719 |
|
| 107 |
-
| Saaroa | 2,130 | 9,819 | 11,949 |
|
| 108 |
-
| Sakizaya | 2,132 | 11,318 | 13,450 |
|
| 109 |
-
| Yami/Tao | 3,009 | 12,792 | 15,801 |
|
| 110 |
-
| Atayal | 11,724 | 35,471 | 47,195 |
|
| 111 |
-
| Seediq/Truku | 7,244 | 29,840 | 37,084 |
|
| 112 |
-
| Tsou | 2,117 | 8,861 | 10,978 |
|
| 113 |
-
| Kanakanavu | 2,105 | 11,904 | 14,009 |
|
| 114 |
-
| Saisiyat | 2,115 | 11,117 | 13,232 |
|
| 115 |
-
| **TOTAL** | **85,144** | **308,490** | **393,634** |
|
| 116 |
-
|
| 117 |
-
Many languages also include **dialect labels**, for example:
|
| 118 |
-
|
| 119 |
-
- Amis: UNKNOWN, Southern, Malan, Coastal, Xiuguluan, Hengchun
|
| 120 |
-
- Bunun: UNKNOWN, Junqun, Luanqun, Kaqun, Tanqun, Zhuoqun
|
| 121 |
-
- Paiwan, Puyuma, Rukai, Atayal, Seediq/Truku: multiple dialects
|
| 122 |
-
- Others (e.g. Kavalan, Thao, Saaroa, Tsou, Kanakanavu, Saisiyat, Sakizaya, Yami/Tao) currently use `UNKNOWN` dialect
|
| 123 |
-
|
| 124 |
-
Dialect coverage makes it possible to do dialect-specific MT or robustness studies.
|
| 125 |
-
|
| 126 |
-
---
|
| 127 |
-
|
| 128 |
-
## Dataset Structure
|
| 129 |
-
|
| 130 |
-
### Data Files
|
| 131 |
-
|
| 132 |
-
- `formosan_en_hf.csv` – all Formosan→English pairs
|
| 133 |
-
- `formosan_zh_hf.csv` – all Formosan→Chinese pairs
|
| 134 |
-
|
| 135 |
-
Each file contains all languages and splits. The **language direction** and **split** are specified per row.
|
| 136 |
-
|
| 137 |
-
### Data Fields
|
| 138 |
-
|
| 139 |
-
All CSVs share the same schema:
|
| 140 |
-
|
| 141 |
-
```text
|
| 142 |
-
id,source_lang,target_lang,source_sentence,target_sentence,lang_code,dialect,source,split
|
| 143 |
-
````
|
| 144 |
-
|
| 145 |
-
* `id` *(int)* – unique row identifier within each file.
|
| 146 |
-
* `source_lang` *(str)* – language code of the Formosan language (e.g. `"ami"`, `"bnn"`).
|
| 147 |
-
* `target_lang` *(str)* – target language code (`"en"` or `"zh"`).
|
| 148 |
-
* `source_sentence` *(str)* – sentence or phrase in the Formosan language.
|
| 149 |
-
* `target_sentence` *(str)* – translation into the target language.
|
| 150 |
-
* `lang_code` *(str)* – canonical code for the Formosan language (usually same as `source_lang`).
|
| 151 |
-
* `dialect` *(str)* – dialect label (e.g. `"Southern"`, `"Malan"`, `"UNKNOWN"`).
|
| 152 |
-
* `source` *(str)* – provenance string or original file path in the upstream corpora.
|
| 153 |
-
* `split` *(str)* – one of `"train"`, `"validate"`, `"test"`.
|
| 154 |
|
| 155 |
-
#
|
| 156 |
-
|
| 157 |
-
Splits are defined **per row** via the `split` column:
|
| 158 |
-
|
| 159 |
-
* `train` – training data
|
| 160 |
-
* `validate` – development / validate data
|
| 161 |
-
* `test` – held-out test data
|
| 162 |
|
| 163 |
-
|
| 164 |
|
| 165 |
-
|
| 166 |
-
* Validate: 29,412
|
| 167 |
-
* Test: 29,450
|
| 168 |
|
| 169 |
-
|
|
|
|
| 170 |
|
| 171 |
-
|
| 172 |
|
| 173 |
-
##
|
| 174 |
|
| 175 |
-
|
| 176 |
|
| 177 |
-
|
| 178 |
-
pip install datasets
|
| 179 |
-
# optional, if you plan to fine-tune models:
|
| 180 |
-
pip install transformers
|
| 181 |
-
```
|
| 182 |
|
| 183 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 184 |
|
| 185 |
-
|
| 186 |
|
| 187 |
```text
|
| 188 |
-
|
| 189 |
-
```
|
| 190 |
-
|
| 191 |
-
Load both CSVs:
|
| 192 |
-
|
| 193 |
-
```python
|
| 194 |
-
from datasets import load_dataset
|
| 195 |
-
|
| 196 |
-
HF_ID = "FormosanBankDemos/formosan-mt"
|
| 197 |
-
|
| 198 |
-
# Formosan → English
|
| 199 |
-
ds_en_all = load_dataset(
|
| 200 |
-
HF_ID,
|
| 201 |
-
data_files="formosan_en_hf.csv",
|
| 202 |
-
)["train"] # entire CSV exposed as a 'train' split by default
|
| 203 |
-
|
| 204 |
-
# Formosan → Chinese
|
| 205 |
-
ds_zh_all = load_dataset(
|
| 206 |
-
HF_ID,
|
| 207 |
-
data_files="formosan_zh_hf.csv",
|
| 208 |
-
)["train"]
|
| 209 |
-
```
|
| 210 |
-
|
| 211 |
-
Alternatively, if you rely on the YAML `configs` defined above:
|
| 212 |
-
|
| 213 |
-
```python
|
| 214 |
-
# Uses config_name: "formosan-en" from the README metadata
|
| 215 |
-
ds_en_all = load_dataset(
|
| 216 |
-
HF_ID,
|
| 217 |
-
name="formosan-en",
|
| 218 |
-
split="train",
|
| 219 |
-
)
|
| 220 |
```
|
| 221 |
|
| 222 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 223 |
|
| 224 |
```python
|
| 225 |
-
|
| 226 |
-
lambda ex: ex["source_lang"] == "ami" and ex["target_lang"] == "en"
|
| 227 |
-
)
|
| 228 |
-
|
| 229 |
-
print(ami_en)
|
| 230 |
-
# Dataset({
|
| 231 |
-
# features: ['id', 'source_lang', 'target_lang', 'source_sentence', ...],
|
| 232 |
-
# num_rows: ...
|
| 233 |
-
# })
|
| 234 |
-
```
|
| 235 |
|
| 236 |
-
|
| 237 |
|
| 238 |
-
|
| 239 |
-
|
| 240 |
|
| 241 |
def split_by_column(ds):
|
| 242 |
return DatasetDict({
|
| 243 |
-
"train":
|
| 244 |
"validate": ds.filter(lambda ex: ex["split"] == "validate"),
|
| 245 |
-
"test":
|
| 246 |
})
|
| 247 |
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
print(ami_en_splits)
|
| 251 |
-
# DatasetDict({
|
| 252 |
-
# train: Dataset({ ... })
|
| 253 |
-
# validate: Dataset({ ... })
|
| 254 |
-
# test: Dataset({ ... })
|
| 255 |
-
# })
|
| 256 |
```
|
| 257 |
|
| 258 |
-
##
|
| 259 |
-
|
| 260 |
-
Many translation training scripts expect a `translation` field like `{"ami": "...", "en": "..."}`. You can construct it from existing columns:
|
| 261 |
|
| 262 |
```python
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
batch["source_lang"],
|
| 269 |
-
batch["target_lang"],
|
| 270 |
-
):
|
| 271 |
-
translations.append({sl: src, tl: tgt})
|
| 272 |
-
return {"translation": translations}
|
| 273 |
-
|
| 274 |
-
ami_en_splits = ami_en_splits.map(add_translation, batched=True)
|
| 275 |
-
|
| 276 |
-
print(ami_en_splits["train"][0]["translation"])
|
| 277 |
-
# {'ami': "sa'osi", 'en': 'true'}
|
| 278 |
```
|
| 279 |
|
| 280 |
-
|
|
|
|
|
|
|
| 281 |
|
| 282 |
```python
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
```
|
| 289 |
|
| 290 |
-
-
|
| 291 |
-
|
| 292 |
-
## Intended Uses, Limitations, and Risks
|
| 293 |
|
| 294 |
-
##
|
| 295 |
|
| 296 |
-
|
| 297 |
-
* Studies of **dialect variation** in MT via the `dialect` field.
|
| 298 |
-
* Baseline and benchmark datasets for multilingual models focusing on Austronesian languages.
|
| 299 |
|
| 300 |
-
|
|
|
|
|
|
|
|
|
|
| 301 |
|
| 302 |
-
|
| 303 |
-
* Dialect labels are not always available; some corpora use `UNKNOWN` for dialect.
|
| 304 |
-
* The dataset currently encodes translations only **into** English and Chinese, not between Formosan languages.
|
| 305 |
|
| 306 |
-
##
|
| 307 |
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
|
|
|
| 311 |
|
| 312 |
-
|
| 313 |
|
| 314 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 315 |
|
| 316 |
## Citation
|
| 317 |
|
| 318 |
-
If you use this dataset
|
| 319 |
-
|
| 320 |
-
FormosanBank annotations and metadata are CC-BY-4.0. This means you must cite the source in any redistributed or derived products.
|
| 321 |
-
For code packages, you may refer to the GitHub repository. For academic publications, you should cite Mohamed, W., Le Ferrand, É., Sung, L.-M., Prud'hommeaux, E., & Hartshorne, J. K. (2024).
|
| 322 |
-
FormosanBank. Electronic Resource.
|
| 323 |
-
|
| 324 |
-
> FormosanBankDemos. *FormosanBank Machine Translation Dataset*. Hugging Face Datasets.
|
| 325 |
-
> Available at: [https://huggingface.co/datasets/FormosanBankDemos/formosan-mt](https://huggingface.co/datasets/FormosanBankDemos/formosan-mt)
|
| 326 |
-
|
| 327 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
pretty_name: FormosanBank Machine Translation
|
| 3 |
license: cc-by-4.0
|
| 4 |
task_categories:
|
| 5 |
+
- translation
|
| 6 |
language:
|
| 7 |
+
- ami
|
| 8 |
+
- bnn
|
| 9 |
+
- ckv
|
| 10 |
+
- dru
|
| 11 |
+
- pwn
|
| 12 |
+
- pyu
|
| 13 |
+
- ssf
|
| 14 |
+
- sxr
|
| 15 |
+
- szy
|
| 16 |
+
- tao
|
| 17 |
+
- tay
|
| 18 |
+
- trv
|
| 19 |
+
- tsu
|
| 20 |
+
- xnb
|
| 21 |
+
- xsy
|
| 22 |
+
- en
|
| 23 |
+
- zh
|
|
|
|
|
|
|
| 24 |
size_categories:
|
| 25 |
+
- 100K<n<1M
|
| 26 |
tags:
|
| 27 |
+
- translation
|
| 28 |
+
- machine-translation
|
| 29 |
+
- low-resource
|
| 30 |
+
- endangered-languages
|
| 31 |
+
- formosan-languages
|
| 32 |
+
- leakage-controlled
|
| 33 |
+
- hard-split
|
| 34 |
library_name: datasets
|
| 35 |
configs:
|
| 36 |
+
- config_name: formosan-en
|
| 37 |
+
data_files:
|
| 38 |
+
- split: train
|
| 39 |
+
path: formosan_en_hf.csv
|
| 40 |
+
- config_name: formosan-zh
|
| 41 |
+
data_files:
|
| 42 |
+
- split: train
|
| 43 |
+
path: formosan_zh_hf.csv
|
| 44 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
+
# FormosanBank Machine Translation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
+
Public parallel corpora for 15 Indigenous Formosan languages aligned to English and Mandarin Chinese. The dataset is published in the same CSV format as earlier releases, but the train/validate/test labels have been rebuilt as leakage-controlled hard splits for more realistic MT evaluation.
|
| 49 |
|
| 50 |
+
The two files are:
|
|
|
|
|
|
|
| 51 |
|
| 52 |
+
- `formosan_en_hf.csv`: Formosan -> English rows where an English translation is available.
|
| 53 |
+
- `formosan_zh_hf.csv`: Formosan -> Chinese rows where a Chinese translation is available.
|
| 54 |
|
| 55 |
+
Some public rows have Chinese but no English translation, so the Chinese config is larger than the English config.
|
| 56 |
|
| 57 |
+
## Important Note
|
| 58 |
|
| 59 |
+
FormosanBank MT models may use this public data together with additional private or restricted corpora. This dataset is the public MT corpus only.
|
| 60 |
|
| 61 |
+
## Dataset Summary
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
+
| Config | Rows | Train | Validate | Test |
|
| 64 |
+
|---|---:|---:|---:|---:|
|
| 65 |
+
| `formosan-en` | 87,427 | 83,249 | 1,480 | 2,698 |
|
| 66 |
+
| `formosan-zh` | 270,082 | 241,243 | 7,115 | 21,724 |
|
| 67 |
+
| **Total** | 357,509 | 324,492 | 8,595 | 24,422 |
|
| 68 |
|
| 69 |
+
The source file used for this release was the public combined corpus with columns:
|
| 70 |
|
| 71 |
```text
|
| 72 |
+
lang_code,formosan_sentence,chinese_sentence,english_sentence,source,dialect,split
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
```
|
| 74 |
|
| 75 |
+
The original `split` column was ignored and rebuilt from scratch.
|
| 76 |
+
|
| 77 |
+
## What Changed In This Release
|
| 78 |
+
|
| 79 |
+
The current release uses an `in_domain_hard` split strategy modeled after the FormosanBank MT experiment splits:
|
| 80 |
+
|
| 81 |
+
- It removes rows that would create exact normalized leakage between train and validate/test.
|
| 82 |
+
- It enforces zero normalized train-vs-eval overlap for Formosan text, target text, and Formosan-target pairs.
|
| 83 |
+
- It holds out source documents for validate/test, so evaluation is not just memorized neighboring rows from the same source file.
|
| 84 |
+
- It keeps lexical, classroom, dictionary, and other short/easy rows in training where they can help vocabulary learning.
|
| 85 |
+
- It excludes short/easy rows from validate/test to avoid inflated scores from dictionary-style examples.
|
| 86 |
+
- Validate/test rows require at least 4 Formosan tokens and 4 target-side tokens.
|
| 87 |
+
|
| 88 |
+
This means the held-out sets are intentionally harder than older random or lightly shuffled splits. Scores on this dataset should be treated as a more honest estimate of out-of-sample MT performance.
|
| 89 |
+
|
| 90 |
+
## Languages
|
| 91 |
+
|
| 92 |
+
| Code | Language | Formosan->English | Formosan->Chinese | Total |
|
| 93 |
+
|---|---|---:|---:|---:|
|
| 94 |
+
| `ami` | Amis | 10,183 | 25,481 | 35,664 |
|
| 95 |
+
| `bnn` | Bunun | 10,353 | 26,820 | 37,173 |
|
| 96 |
+
| `ckv` | Kavalan | 3,893 | 15,079 | 18,972 |
|
| 97 |
+
| `dru` | Rukai | 12,833 | 33,486 | 46,319 |
|
| 98 |
+
| `pwn` | Paiwan | 5,833 | 20,018 | 25,851 |
|
| 99 |
+
| `pyu` | Puyuma | 6,313 | 22,064 | 28,377 |
|
| 100 |
+
| `ssf` | Thao | 1,803 | 9,116 | 10,919 |
|
| 101 |
+
| `sxr` | Saaroa | 1,799 | 7,301 | 9,100 |
|
| 102 |
+
| `szy` | Sakizaya | 2,668 | 10,286 | 12,954 |
|
| 103 |
+
| `tao` | Tao / Yami | 2,418 | 11,133 | 13,551 |
|
| 104 |
+
| `tay` | Atayal | 11,362 | 29,460 | 40,822 |
|
| 105 |
+
| `trv` | Seediq / Truku | 8,500 | 28,583 | 37,083 |
|
| 106 |
+
| `tsu` | Tsou | 2,583 | 7,617 | 10,200 |
|
| 107 |
+
| `xnb` | Kanakanavu | 4,241 | 13,976 | 18,217 |
|
| 108 |
+
| `xsy` | Saisiyat | 2,645 | 9,662 | 12,307 |
|
| 109 |
+
|
| 110 |
+
## Schema
|
| 111 |
+
|
| 112 |
+
Both CSV files use the same 9-column schema:
|
| 113 |
+
|
| 114 |
+
| Field | Type | Description |
|
| 115 |
+
|---|---|---|
|
| 116 |
+
| `id` | integer | Row identifier within the file. |
|
| 117 |
+
| `source_lang` | string | Formosan source language code, e.g. `ami`, `bnn`, `tay`. |
|
| 118 |
+
| `target_lang` | string | `en` for English or `zh` for Chinese. |
|
| 119 |
+
| `source_sentence` | string | Formosan sentence or phrase. |
|
| 120 |
+
| `target_sentence` | string | English or Chinese translation. |
|
| 121 |
+
| `lang_code` | string | Same Formosan code as `source_lang`; retained for compatibility. |
|
| 122 |
+
| `dialect` | string | Dialect label when available, otherwise `UNKNOWN`. |
|
| 123 |
+
| `source` | string | Provenance path or source identifier from the upstream corpus. |
|
| 124 |
+
| `split` | string | One of `train`, `validate`, or `test`. |
|
| 125 |
+
|
| 126 |
+
## Loading With `datasets`
|
| 127 |
+
|
| 128 |
+
The files are configured as two dataset configs. Because each config is a single CSV file, Hugging Face `datasets` exposes the file as a `train` split; use the row-level `split` column to recover train/validate/test subsets.
|
| 129 |
|
| 130 |
```python
|
| 131 |
+
from datasets import DatasetDict, load_dataset
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
|
| 133 |
+
repo_id = "FormosanBank/formosan-mt"
|
| 134 |
|
| 135 |
+
ds_en_all = load_dataset(repo_id, "formosan-en", split="train")
|
| 136 |
+
ds_zh_all = load_dataset(repo_id, "formosan-zh", split="train")
|
| 137 |
|
| 138 |
def split_by_column(ds):
|
| 139 |
return DatasetDict({
|
| 140 |
+
"train": ds.filter(lambda ex: ex["split"] == "train"),
|
| 141 |
"validate": ds.filter(lambda ex: ex["split"] == "validate"),
|
| 142 |
+
"test": ds.filter(lambda ex: ex["split"] == "test"),
|
| 143 |
})
|
| 144 |
|
| 145 |
+
en_splits = split_by_column(ds_en_all)
|
| 146 |
+
zh_splits = split_by_column(ds_zh_all)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 147 |
```
|
| 148 |
|
| 149 |
+
## Filtering To One Language
|
|
|
|
|
|
|
| 150 |
|
| 151 |
```python
|
| 152 |
+
ami_en = ds_en_all.filter(lambda ex: ex["lang_code"] == "ami")
|
| 153 |
+
ami_en_splits = split_by_column(ami_en)
|
| 154 |
+
|
| 155 |
+
atayal_zh = ds_zh_all.filter(lambda ex: ex["lang_code"] == "tay")
|
| 156 |
+
atayal_zh_splits = split_by_column(atayal_zh)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
```
|
| 158 |
|
| 159 |
+
## Training Format Example
|
| 160 |
+
|
| 161 |
+
Most seq2seq MT trainers expect source and target text columns. For Formosan -> English:
|
| 162 |
|
| 163 |
```python
|
| 164 |
+
example = ds_en_all[0]
|
| 165 |
+
source_text = example["source_sentence"]
|
| 166 |
+
target_text = example["target_sentence"]
|
| 167 |
+
source_lang = example["source_lang"]
|
| 168 |
+
target_lang = example["target_lang"]
|
| 169 |
```
|
| 170 |
|
| 171 |
+
To train a reverse direction such as English -> Formosan, swap `source_sentence` and `target_sentence` in your preprocessing and use `lang_code` to choose the Formosan target language.
|
|
|
|
|
|
|
| 172 |
|
| 173 |
+
## Split Validation
|
| 174 |
|
| 175 |
+
The generated hard splits were validated with these checks:
|
|
|
|
|
|
|
| 176 |
|
| 177 |
+
| Config | Train-vs-eval Formosan overlap | Train-vs-eval target overlap | Train-vs-eval pair overlap | Eval short/easy rows |
|
| 178 |
+
|---|---:|---:|---:|---:|
|
| 179 |
+
| `formosan-en` | 0 | 0 | 0 | 0 |
|
| 180 |
+
| `formosan-zh` | 0 | 0 | 0 | 0 |
|
| 181 |
|
| 182 |
+
The validation and test splits are sentence-like evaluation sets, while lexical/easy examples remain available for training.
|
|
|
|
|
|
|
| 183 |
|
| 184 |
+
## Intended Use
|
| 185 |
|
| 186 |
+
- Research on low-resource Formosan machine translation.
|
| 187 |
+
- Training and evaluating Formosan -> English and Formosan -> Chinese MT systems.
|
| 188 |
+
- Building reverse-direction systems by swapping source and target during preprocessing.
|
| 189 |
+
- Dialect-aware and source-domain-aware MT experiments using `dialect` and `source` metadata.
|
| 190 |
|
| 191 |
+
## Limitations
|
| 192 |
|
| 193 |
+
- The corpus contains heterogeneous sources, dialects, sentence lengths, and translation styles.
|
| 194 |
+
- Some rows are short phrase or lexicon-like entries; these are useful for training but excluded from validate/test in this hard split.
|
| 195 |
+
- The split prevents exact normalized leakage, but it cannot guarantee semantic non-overlap between paraphrases.
|
| 196 |
+
- English and Chinese coverage differ because not every public row has both translations.
|
| 197 |
+
- Community-facing or high-stakes translation systems should include fluent-speaker review.
|
| 198 |
|
| 199 |
## Citation
|
| 200 |
|
| 201 |
+
If you use this dataset, please cite FormosanBank and the upstream corpus sources where applicable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
|
| 203 |
+
```bibtex
|
| 204 |
+
@misc{formosanbank_mt_public_hard_splits,
|
| 205 |
+
title = {FormosanBank Machine Translation Public Corpus: Leakage-Controlled Hard Splits},
|
| 206 |
+
author = {FormosanBank contributors},
|
| 207 |
+
year = {2026},
|
| 208 |
+
howpublished = {https://huggingface.co/datasets/FormosanBank/formosan-mt}
|
| 209 |
+
}
|
| 210 |
+
```
|
formosan_en_hf.csv
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:992c6a4ebb9758a7bf6d45faddbe8483e14a39ce7bd239dbba102c4a68c4db3e
|
| 3 |
+
size 15450162
|
formosan_zh_hf.csv
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:6eedb07b2602451e74808675d970152cd2db765eb76a2011c4c2294cb71b1ce1
|
| 3 |
+
size 50681166
|