chagatai-parallel / README.md
Inomjonov's picture
Upload README.md with huggingface_hub
40ceb0f verified
|
Raw
History Blame Contribute Delete
4.91 kB
---
dataset_info:
features:
- name: src_text
dtype: large_string
- name: tgt_text
dtype: large_string
- name: src_lang
dtype: large_string
- name: tgt_lang
dtype: large_string
- name: source
dtype: large_string
splits:
- name: train
num_bytes: 954517359
num_examples: 2967678
download_size: 449761134
dataset_size: 954517359
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
---
# Chagatai / Central-Asian Parallel Corpus
A unified parallel-translation dataset assembled from the sources catalogued in
`Datasets_chagatai_final(1) (1).xlsx`. Every underlying corpus is normalised to a
single flat schema so it can be loaded and mixed in one line.
## Schema
| column | type | description |
|------------|--------|-----------------------------------------------|
| `src_text` | string | segment in the source language |
| `tgt_text` | string | its translation in the target language |
| `src_lang` | string | source language code (normalised, see below) |
| `tgt_lang` | string | target language code (normalised) |
| `source` | string | which underlying dataset the pair came from |
Language codes are normalised to short ISO-639 forms: `ar` Arabic, `ru` Russian,
`en` English, `fa` Persian, `kk` Kazakh, `tk` Turkmen, `tr` Turkish, `ug` Uyghur,
`uz` Uzbek (Northern/Latin), `uzs` Uzbek (Southern/Arabic script), `azb` South
Azerbaijani, `chg` Chagatai.
## Load
```python
from datasets import load_dataset
ds = load_dataset("parquet", data_files="data/chagatai_parallel.parquet")["train"]
# or the Arrow copy written by the build script:
from datasets import load_from_disk
ds = load_from_disk("hf_dataset")
```
## Contents (current build)
Built from **every HuggingFace source** in the catalog (public + gated, which
required a token with granted access) **plus the local Chagatai corpora** (Eric
Schluessel textbook, dictionary, exercises — downloaded from Google Drive).
Totals are after cleaning (trim, drop empty/duplicate pairs, strip BOM/zero-width).
**24 language pairs · 2,967,678 pairs total.**
| language pair | rows | source dataset(s) |
|---------------|---------|-------------------|
| en → ar | 959,928 | sentence-transformers/parallel-sentences-opus-100 |
| kk → tr | 711,658 | liboaccn/nmt-parallel-corpus + issai/kazparc |
| azb → en | 549,604 | Kartal-Ol/en-azb-548k + facebook/flores |
| ar → kk | 346,680 | liboaccn/nmt-parallel-corpus |
| kk → en | 290,875 | issai/kazparc |
| uz → uzs | 37,163 | tahrirchi/lutfiy |
| ar → en | 17,814 | haoranxu/X-ALMA-Parallel-Data + kingkaung/islamqainfo |
| en → fa | 8,579 | aiana94/polynews-parallel |
| kk → ug | 4,499 | liboaccn/nmt-parallel-corpus |
| ug → en | 3,087 | kingkaung/islamqainfo + facebook/flores |
| tr → en | 2,945 | kingkaung/islamqainfo |
| ar → ru | 2,385 | aiana94/polynews-parallel |
| en → uzs | 2,530 | tahrirchi/lutfiy |
| kk → tk | 1,116 | liboaccn/nmt-parallel-corpus |
| **Chagatai (chg + chg_latn)** | **28,815** | **Eric Schluessel textbook / dictionary / exercises** |
|   chg → kk | 5,076 | textbook + dictionary |
|   chg → en | 2,912 | textbook + exercises |
|   chg → ru | 2,682 | textbook |
|   chg → tr | 2,587 | textbook |
|   chg → uz | 2,433 | textbook |
|   chg_latn → {en,kk,ru,tr,uz} | 2,904 / 2,542 / 2,681 / 2,574 / 2,424 | textbook + exercises |
| **total** | **2,967,678** | |
`chg` = Chagatai in Arabic script, `chg_latn` = Chagatai in Latin transliteration.
See `stats.json` for the exact per-source / per-pair breakdown of the last build.
The Chagatai loaders read three local files that must sit next to the script
(download them from the Google Drive links in the catalog):
- `Textbook on Chagatai (Eric Schluessel).xlsx`
- `ЛИНГВИСТЕРГЕ.xlsx` (dictionary → Kazakh definitions)
- `Eric_Exercise .xlsx`
If they are absent the build simply skips them and logs why.
## Not yet included
- `Dataset_OCR` (Chagatai OCR, on institute SharePoint) and `output_images_clean`
(images) — not sentence-parallel text, so out of scope for this schema.
- `uy_ts_articles` (Uyghur) and the monolingual `cis-lmu/GlotSparse`,
`Uyghur-Corpus/Uyghur-Corpus` — monolingual, no target side.
## Rebuild / extend
```bash
pip install datasets pyarrow huggingface_hub pandas
# public sources only:
python build_dataset.py
# include the gated Kazakh sources (after requesting access on each dataset page):
export HF_TOKEN=hf_xxx
python build_dataset.py
```
The source registry (`SOURCES` in `build_dataset.py`) is config-driven — add a
local Chagatai CSV by appending one entry with a small loader function.