BhashaSetu-2 / README.md
ParamTh's picture
Point to the main BhashaSetu repository
cc35494 verified
|
Raw History Blame Contribute Delete
8.35 kB
---
license: cc-by-4.0
task_categories:
- translation
language:
- en
- mr
size_categories:
- 1M<n<10M
pretty_name: BhashaSetu v2
configs:
- config_name: default
data_files:
- split: train
path: data/train-*.parquet
- split: validation
path: data/dev.parquet
- split: test
path: data/test.parquet
---
# BhashaSetu v2: English–Marathi parallel corpus
> **BhashaSetu v2 is maintained at [ParamTh/BhashaSetu](https://huggingface.co/datasets/ParamTh/BhashaSetu).** This copy is identical; please use and cite the main repository.
**6,937,554 English–Marathi sentence pairs**, every one checked to be a
sentence pair, deduplicated, decontaminated against the standard benchmarks, and
labelled with its source, licence and a quality score. Everything is
redistributable (CC0 / CC-BY-4.0).
### What's new in v2 (October 2026)
- **Much larger and fully deduplicated**: 6.9M unique pairs, against 24,525
unique pairs in v1's 2.8M rows.
- **One sentence pair per row**, with original punctuation and casing. v1 rows
joined several sentences with punctuation removed.
- **Proper held-out splits**: validation and test are human translations,
disjoint from training and decontaminated against FLORES-200 and IN22. v1's
test splits overlapped its training data, so scores measured on them should
be re-run on this version.
- **Redistributable**: built only from CC0 and CC-BY-4.0 sources, released
under CC-BY-4.0.
- **Per-row provenance and quality scores** (`source`, `license`,
`quality_tier`, `labse`).
## At a glance
| | |
|---|---|
| Pairs | 6,937,554 (train 6,932,554 / validation 2,000 / test 3,000) |
| Human-translated pairs | 219,086 |
| Mined pairs, LaBSE ≥ 0.85 | 3,200,251 |
| Mined pairs, LaBSE 0.80–0.85 | 3,518,217 |
| Candidate rows examined | 19,290,824 |
| Licence | CC-BY-4.0 overall; per-row licence in `license` |
**The validation and test splits are human translations only.** A test set drawn
from mined data rewards reproducing the miner's errors.
## Loading
```python
from datasets import load_dataset
ds = load_dataset("ParamTh/BhashaSetu")
# Highest-precision subset: human translations plus confidently mined pairs
hq = ds["train"].filter(lambda r: r["quality_tier"] in ("human", "high"))
```
## Columns
| Column | Meaning |
|---|---|
| `id` | Stable 64-bit hash of the normalised pair |
| `english`, `marathi` | The pair. Original casing and punctuation; never lowercased, stemmed or stripped |
| `source` | Which upstream collection the row came from (table below) |
| `license` | Licence of that upstream collection |
| `translation` | `human` or `mined` |
| `quality_tier` | `human`; `high` (mined, LaBSE ≥ 0.85); `standard` (mined, 0.80–0.85) |
| `labse` | LaBSE cosine for mined rows as released by AI4Bharat (empty for human rows) |
| `en_tokens`, `mr_tokens` | Whitespace token counts |
Tiers are descriptive rather than calibrated. A LaBSE threshold tuned on one
dataset does not transfer reliably to another, so the score is exposed and the
choice is left to you.
## Sources
All sources are the English–Marathi portions of AI4Bharat's
[BPCC](https://huggingface.co/datasets/ai4bharat/BPCC) (Gala et al., 2023). When a pair occurs in several sources, the
row is attributed to the first one in this table.
| Source | Description | Translation | Rows kept | Licence |
|---|---|---|---|---|
| `bpcc_wiki` | BPCC-H-Wiki: professional human translation of Wikipedia sentences | human | 50,386 | CC-BY-4.0 |
| `bpcc_daily` | BPCC-H-Daily: professional human translation of everyday sentences | human | 3,771 | CC-BY-4.0 |
| `bpcc_seed` | BPCC seed collection (human-translated; includes NLLB-Seed) | human | 60,455 | CC-BY-4.0 |
| `ilci` | ILCI: human-translated health and tourism sentences | human | 104,474 | CC0-1.0 |
| `samanantar_filtered` | Samanantar (v0.3), LaBSE-filtered by AI4Bharat | mined | 1,262,660 | CC0-1.0 |
| `samanantar_pp` | Samanantar++, mined by AI4Bharat for IndicTrans2 | mined | 2,911,164 | CC0-1.0 |
| `nllb_filtered` | NLLB mined bitext, LaBSE-filtered by AI4Bharat | mined | 2,182,847 | CC0-1.0 |
| `comparable` | Sentences mined from comparable news articles | mined | 361,797 | CC0-1.0 |
## How it was built
1. **Normalisation**: markup removal, Unicode and Indic normalisation.
2. **Script purity**: at least half the English side in Latin script and half the
Marathi side in Devanagari.
3. **Numeric consistency**: every number on the English side appears on the
Marathi side.
4. **Sentence-boundary gate**: rows whose two sides contain different numbers of
sentences, rows with more than three sentences, extreme length ratios, and
long rows with no internal punctuation are removed. This targets rows where the
two sides drift apart partway through, which embedding-similarity filters miss.
5. **Hindi check**: Hindi text shares the Devanagari script and passes
script checks. Rows whose "Marathi" side is dominated by Hindi function words
are removed.
6. **Benchmark decontamination** against FLORES-200 dev and devtest and IN22-Gen:
exact matches on either side, plus MinHash near-duplicates of the English side.
7. **Deduplication**: exact pairs, then at most one row per normalised English
sentence and one per normalised Marathi sentence, keeping human translation
over mined and then the higher LaBSE score. This removed
965,721 duplicate pairs, 3,286,415 repeated English sentences and
7,317,365 repeated Marathi sentences.
Rows removed at each stage, per source (19,290,824 examined, 18,507,055 passed the gates
before deduplication):
| Source | Read | Script | Numeric | Boundary | Hindi | Benchmark | Passed |
|---|---|---|---|---|---|---|---|
| `bpcc_wiki` | 54,348 | 0 | 658 | 1,938 | 44 | 6 | 51,702 |
| `bpcc_daily` | 4,565 | 0 | 10 | 779 | 4 | 0 | 3,772 |
| `bpcc_seed` | 117,275 | 1 | 1,160 | 3,918 | 92 | 37 | 112,067 |
| `ilci` | 116,979 | 28 | 3,008 | 4,876 | 183 | 1 | 108,883 |
| `samanantar_filtered` | 1,366,103 | 1,085 | 16,100 | 57,290 | 487 | 4 | 1,291,136 |
| `samanantar_pp` | 10,806,011 | 4,044 | 6,502 | 200,339 | 5,120 | 1 | 10,590,003 |
| `nllb_filtered` | 6,393,165 | 23,199 | 232,871 | 181,435 | 3,508 | 3 | 5,952,142 |
| `comparable` | 432,378 | 4,173 | 14,783 | 13,811 | 2,260 | 0 | 397,350 |
One upstream detail worth knowing: BPCC's `nllb_filtered` score file stores
**1 − cosine**, unlike its other subsets (our own LaBSE cosines correlate with it at
exactly −1.00). We invert it, so `labse` means the same thing on every row.
## Does it train better models?
Fine-tuning NLLB-200-distilled-600M (LoRA, 400 steps, 20,000 rows, seed 42) and evaluating on FLORES-200 devtest (400 sentences):
| Training data | BLEU | chrF++ | spBLEU |
|---|---|---|---|
| BhashaSetu v1 | 9.83 | 42.12 | 23.08 |
| **BhashaSetu v2** | **12.38** | **43.70** | **24.24** |
This is a small-budget comparison (a 4 GB GPU) that shows the direction of the difference, not its size at scale.
## Limitations
- Mined pairs are machine-aligned. The gates remove structural errors, not every
mistranslation. Spot checks find wrong pairs mainly among short news headlines
in the `standard` tier, e.g. *"Delay in sowing of wheat"* paired with a
Marathi headline about delayed sugarcane harvesting. For high-precision
training use the `human` and `high` tiers.
- The sentence segmenter is heuristic and rejects about 4% of clean gold pairs.
- IN22-Conv was not available to us for decontamination.
- The Hindi check uses function words, so short or code-mixed rows can slip through.
## Licence and attribution
Released under **CC-BY-4.0**. The mined and older seed collections were released by
AI4Bharat under CC0 and the BPCC-H human translations under CC-BY-4.0; per-row
licences are in the `license` column. Please cite BPCC/IndicTrans2 alongside this
dataset:
```bibtex
@article{gala2023indictrans2,
title = {IndicTrans2: Towards High-Quality and Accessible Machine Translation Models for all 22 Scheduled Languages of India},
author = {Gala, Jay and others},
journal = {Transactions on Machine Learning Research},
year = {2023}
}
```