failed09 commited on
Commit
0378a78
·
verified ·
1 Parent(s): 2e6b385

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -11,18 +11,18 @@ configs:
11
  data_files:
12
  - split: train
13
  path: cleaned/data.parquet
14
- - config_name: precleaned
15
  data_files:
16
  - split: train
17
- path: precleaned/data.parquet
18
  - config_name: scored
19
  data_files:
20
  - split: train
21
  path: scored/data.parquet
22
- - config_name: filtered
23
  data_files:
24
  - split: train
25
- path: filtered/data.parquet
26
  tags:
27
  - bashkir
28
  - russian
@@ -36,114 +36,87 @@ tags:
36
 
37
  # Bashkir-Russian Wikipedia Parallel Corpus
38
 
39
- Sentence-level Bashkir-Russian parallel data extracted from the Bashkir and
40
- Russian Wikipedia dumps dated `2026-08-01`.
41
 
42
- This repository provides four configurations. The default `cleaned`
43
- configuration is recommended for machine translation training. The
44
- `precleaned` configuration is an earlier, less filtered extraction provided
45
- for alternative preprocessing and research. The `scored` configuration adds
46
- LASER-based quality scores to the `cleaned` pairs. The `filtered`
47
- configuration applies a conservative two-encoder filter on top of `scored`.
48
 
49
  ## Configurations
50
 
51
- ### cleaned
 
 
 
 
 
52
 
53
- - 72,007 sentence pairs
54
- - 34,566 linked article pairs
55
- - URLs, MediaWiki markup, card fragments and malformed punctuation removed
56
- - duplicate and identical pairs removed
57
- - sentence indices retained
58
-
59
- Fields:
60
 
61
  - `ba_title`: Bashkir Wikipedia article title
62
  - `ru_title`: Russian Wikipedia article title
63
- - `section`: `lead` or `facts`
64
  - `ba`: Bashkir sentence
65
  - `ru`: Russian sentence
66
- - `ba_sentence_index`: sentence index in the Bashkir article
67
- - `ru_sentence_index`: sentence index in the Russian article
 
 
 
 
 
 
68
 
69
- ### precleaned
70
 
71
- - 91,949 sentence pairs
72
- - earlier extraction with lighter filtering
73
- - contains older Wiki markup, links and alignment noise
74
 
75
- Fields:
 
 
 
 
 
 
76
 
77
- - `ba_title`, `ru_title`, `section`, `ba`, `ru`
78
 
79
- ### scored
80
 
81
- - 72,007 sentence pairs — **identical rows to `cleaned`**, nothing added or removed
82
- - quality scores computed with Meta LASER sentence embeddings:
83
- - `laser_cos`: cosine similarity between LASER embeddings of the pair
84
- - `laser_margin`: margin normalized by same-language kNN density
85
- - `laser_margin_xling`: margin normalized by **cross-lingual** kNN density
86
- (Artetxe & Schwenk, 2018) — the recommended LASER filter score
87
 
88
- Encoders: LASER3 `bak_Cyrl` (NLLB) for Bashkir, LASER2 for Russian,
89
- 1024-dim L2-normalized embeddings, k=4 neighbours
90
- (`laser_encoders`, facebookresearch/LASER).
91
 
92
- ### filtered
 
93
 
94
- - **69,706 sentence pairs** (−3.20% from `scored`)
95
- - conservative two-encoder filter: a pair is removed only when **both**
96
- scorers place it in their bottom 5%:
97
- `laser_margin_xling < 0.876 AND labse_margin_xling < 0.723`
98
- - second encoder: **LaBSE** (Google, 481M parameters, fp16) — independent
99
- architecture and training data, so its errors are largely uncorrelated
100
- with LASER's
101
- - all score columns retained: `laser_cos`, `laser_margin`,
102
- `laser_margin_xling`, `labse_cos`, `labse_margin_xling`
103
- - removed pairs are dominated by template mismatch sentences (river-tributary
104
- stubs with different facts) and cross-article topic matches
105
 
106
- Score distributions over the full 72,007 pairs:
 
 
 
 
107
 
108
- | score | p01 | p05 | p25 | p50 | p75 | p95 | p99 |
109
- |---|---|---|---|---|---|---|---|
110
- | `laser_cos` | 0.597 | 0.705 | 0.828 | 0.863 | 0.887 | 0.914 | 0.928 |
111
- | `laser_margin_xling` | 0.760 | 0.876 | 0.988 | 1.033 | 1.063 | 1.102 | 1.129 |
112
- | `labse_cos` | 0.206 | 0.408 | 0.698 | 0.789 | 0.859 | 0.932 | 0.963 |
113
- | `labse_margin_xling` | 0.373 | 0.723 | 1.035 | 1.132 | 1.202 | 1.295 | 1.358 |
114
 
115
- ## Source and Processing
 
 
 
 
116
 
117
- The data was extracted from corresponding Bashkir and Russian Wikipedia
118
- articles using the `bawiki-20260801` and `ruwiki-20260801` dumps.
119
 
120
- The cleaned configuration uses article-local sentence indices, numeric
121
- anchors for factual pairs, length-ratio checks, language checks, duplicate
122
- removal and service-fragment filtering. The `scored` and `filtered`
123
- configurations add multilingual sentence-embedding scoring on top of the
124
- same alignment without modifying any text.
125
 
126
  ## License
127
 
128
- The source text is derived from Wikipedia and is distributed under the
129
- [Creative Commons Attribution-ShareAlike 4.0 International license](https://creativecommons.org/licenses/by-sa/4.0/).
130
-
131
- Please preserve Wikipedia attribution when redistributing or publishing
132
- derivative datasets.
133
 
134
- ## Loading
135
-
136
- ```python
137
- from datasets import load_dataset
138
-
139
- cleaned = load_dataset("failed09/bashkir-wikipedia-parallel", "cleaned")
140
- scored = load_dataset("failed09/bashkir-wikipedia-parallel", "scored")
141
- filtered = load_dataset("failed09/bashkir-wikipedia-parallel", "filtered")
142
-
143
- # strict MT-training subset with your own threshold
144
- df = scored["train"].to_pandas()
145
- strict = df[(df.laser_margin_xling >= 0.90) & (df.labse_margin_xling >= 1.0)]
146
- ```
147
 
148
  ## Citation
149
 
@@ -153,6 +126,13 @@ strict = df[(df.laser_margin_xling >= 0.90) & (df.labse_margin_xling >= 1.0)]
153
  author = {failed09},
154
  year = {2026},
155
  publisher = {Hugging Face},
156
- url = {https://huggingface.co/datasets/failed09/bashkir-wikipedia-parallel}
 
157
  }
158
  ```
 
 
 
 
 
 
 
11
  data_files:
12
  - split: train
13
  path: cleaned/data.parquet
14
+ - config_name: filtered
15
  data_files:
16
  - split: train
17
+ path: filtered/data.parquet
18
  - config_name: scored
19
  data_files:
20
  - split: train
21
  path: scored/data.parquet
22
+ - config_name: precleaned
23
  data_files:
24
  - split: train
25
+ path: precleaned/data.parquet
26
  tags:
27
  - bashkir
28
  - russian
 
36
 
37
  # Bashkir-Russian Wikipedia Parallel Corpus
38
 
39
+ Sentence-level Bashkir-Russian parallel dataset extracted from the corresponding Bashkir and Russian Wikipedia dumps dated `2026-08-01`.
 
40
 
41
+ The dataset has been filtered with [Bashkir Language Identification (LID)](https://huggingface.co/failed09/bashkir-lid) to eliminate foreign language leakage and untranslated Russian articles. Multilingual semantic alignment is evaluated using Meta LASER3, Google LaBSE, and the specialized in-domain [Bashkir-Russian Pair Scorer](https://huggingface.co/failed09/bashkir-pair-scorer).
 
 
 
 
 
42
 
43
  ## Configurations
44
 
45
+ | Config | Pairs | Articles | Description |
46
+ |---|---:|---:|---|
47
+ | **`filtered`** (recommended) | **66,498** | 31,574 | High-precision parallel subset filtered by two-voice scoring (LASER3 + LaBSE), verified with LID v3 and annotated with `pair_score`. Recommended for machine translation. |
48
+ | **`cleaned`** | **68,737** | 33,582 | Base alignment with article-level sentence mapping, Wiki markup and service boilerplate removed. Untranslated foreign leaks removed via LID v3. |
49
+ | **`scored`** | **68,737** | 33,582 | Identical rows to `cleaned`, retaining Meta LASER margin scores and `pair_score`. |
50
+ | **`precleaned`** | **84,512** | 40,705 | Broad extraction with relaxed sentence-length heuristics, verified with LID v3. Provided for custom filtering experiments. |
51
 
52
+ ## Fields and Schema
 
 
 
 
 
 
53
 
54
  - `ba_title`: Bashkir Wikipedia article title
55
  - `ru_title`: Russian Wikipedia article title
56
+ - `section`: Section category (`lead` or `facts`)
57
  - `ba`: Bashkir sentence
58
  - `ru`: Russian sentence
59
+ - `ba_sentence_index`: Sentence index in the Bashkir article
60
+ - `ru_sentence_index`: Sentence index in the Russian article
61
+ - `laser_cos`: Cosine similarity between Meta LASER embeddings
62
+ - `laser_margin`: Margin normalized by same-language kNN density
63
+ - `laser_margin_xling`: Margin normalized by cross-lingual kNN density (Artetxe & Schwenk, 2018)
64
+ - `labse_cos`: Cosine similarity between Google LaBSE sentence embeddings
65
+ - `labse_margin_xling`: Cross-lingual margin score for LaBSE embeddings
66
+ - `pair_score`: Semantic compatibility score from [Bashkir-Russian Pair Scorer](https://huggingface.co/failed09/bashkir-pair-scorer) (`medium` model, 0.0 to 1.0)
67
 
68
+ ## Score Distributions
69
 
70
+ Score percentiles computed over the 66,498 pairs in the `filtered` configuration:
 
 
71
 
72
+ | Score | p01 | p05 | p25 | p50 | p75 | p95 | p99 |
73
+ |---|---|---|---|---|---|---|---|
74
+ | `laser_cos` | 0.666 | 0.749 | 0.833 | 0.864 | 0.888 | 0.914 | 0.928 |
75
+ | `laser_margin_xling` | 0.845 | 0.921 | 0.994 | 1.036 | 1.065 | 1.103 | 1.130 |
76
+ | `labse_cos` | 0.312 | 0.509 | 0.707 | 0.789 | 0.856 | 0.926 | 0.954 |
77
+ | `labse_margin_xling` | 0.602 | 0.850 | 1.044 | 1.135 | 1.204 | 1.294 | 1.355 |
78
+ | `pair_score` | 0.039 | 0.394 | 0.950 | 0.987 | 0.996 | 0.999 | 0.999 |
79
 
80
+ ## Source and Processing
81
 
82
+ The data was extracted from corresponding Bashkir and Russian Wikipedia articles using the `bawiki-20260801` and `ruwiki-20260801` dumps.
83
 
84
+ 1. **Language Gate:** Every candidate sentence pair is verified with [Bashkir Language Identification (LID)](https://huggingface.co/failed09/bashkir-lid) (`ba_prob >= 0.50`) to remove untranslated Russian articles and foreign language fragments that entered Wikipedia via automated templates.
85
+ 2. **Text Sanitization:** MediaWiki markup, table formatting, citation markers and broken punctuation are stripped.
86
+ 3. **Multilingual Scoring:** Parallel candidates are scored with LASER3 (`bak_Cyrl.v1` for Bashkir, `laser2` for Russian), Google LaBSE, and [Bashkir-Russian Pair Scorer](https://huggingface.co/failed09/bashkir-pair-scorer) (`medium` model).
 
 
 
87
 
88
+ ## Loading
 
 
89
 
90
+ ```python
91
+ from datasets import load_dataset
92
 
93
+ # Recommended subset for machine translation training
94
+ filtered = load_dataset("failed09/bashkir-wikipedia-parallel", "filtered")
 
 
 
 
 
 
 
 
 
95
 
96
+ # Custom filtering example combining pair_score and LASER margin
97
+ df = filtered["train"].to_pandas()
98
+ strict_subset = df[(df.pair_score >= 0.80) & (df.laser_margin_xling >= 0.95)]
99
+ print(f"Strict high-quality subset: {len(strict_subset):,} sentence pairs")
100
+ ```
101
 
102
+ ## Related Resources
 
 
 
 
 
103
 
104
+ - [Bashkir Wikipedia Monolingual Corpus](https://huggingface.co/datasets/failed09/bashkir-wikipedia-monolingual): Monolingual companion corpus with 800K cleaned sentences extracted from the same Wikipedia dump.
105
+ - [Bashkir-Russian Pair Scorer](https://huggingface.co/failed09/bashkir-pair-scorer): In-domain cross-encoder models (`nano`, `mini`, `medium`) used to generate `pair_score`.
106
+ - [Bashkir Language Identification (LID)](https://huggingface.co/failed09/bashkir-lid): The standalone ONNX LID model used to filter non-Bashkir text.
107
+ - [Bashkir Frequency Index](https://huggingface.co/datasets/failed09/bashkir-frequency-index): Canonical word-frequency and coverage statistics.
108
+ - [Bashkir Word N-gram Index](https://huggingface.co/datasets/failed09/bashkir-ngram-index): Unigram, bigram and trigram sequence counts.
109
 
110
+ ## Quality and Use
 
111
 
112
+ This dataset is compiled from crowd-sourced Wikipedia articles. While automated language identification, regex sanitization, and dual-encoder filtering significantly reduce noise, users should expect occasional translation mismatches, differing article lengths, or encyclopedic jargon. Always inspect and validate the alignment before production deployment.
 
 
 
 
113
 
114
  ## License
115
 
116
+ The underlying source text is derived from Wikipedia and is distributed under the
117
+ [Creative Commons Attribution-ShareAlike 4.0 International license (CC BY-SA 4.0)](https://creativecommons.org/licenses/by-sa/4.0/).
 
 
 
118
 
119
+ Please preserve Wikipedia attribution when redistributing or publishing derivative models and datasets.
 
 
 
 
 
 
 
 
 
 
 
 
120
 
121
  ## Citation
122
 
 
126
  author = {failed09},
127
  year = {2026},
128
  publisher = {Hugging Face},
129
+ url = {https://huggingface.co/datasets/failed09/bashkir-wikipedia-parallel},
130
+ note = {Cleaned Bashkir-Russian Wikipedia parallel corpus with LASER, LaBSE and Pair Scorer metrics}
131
  }
132
  ```
133
+
134
+ ## Open Bashkir Data and Sources 🐝
135
+
136
+ This dataset is part of an open-source initiative to advance NLP resources, machine translation, and language technologies for the Bashkir language. Related models, benchmarks and datasets are available on the author's Hugging Face profile.
137
+
138
+ The author does not claim copyright ownership of the original Wikipedia texts. All rights and licensing remain with the respective Wikipedia contributors and the Wikimedia Foundation under CC BY-SA 4.0.
SHA256SUMS ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ a1efe518e6ede30463089d83808052e6b2e84c0323ed97f0a6dbe39a8b504341 README.md
2
+ 00d32007eddd9dfcef26027e18f33caeb8f6866371a8c96f9b1060c6be8a266f metadata.json
3
+ dbece47e97fa44fccba19d31ddd574cd069e0d843755c889ed757fe4e0dd0e62 cleaned/data.parquet
4
+ 5473b45a4a0c3949c4539d2b3f4bbd6baaa676fa4ae2149e5878fefb5667fdca filtered/data.parquet
5
+ 842b68ff104f7befd20dbde56bc471d3e315100fc5cba1ab582dac16e6bdfff4 precleaned/data.parquet
6
+ e479b053d5b05f1aa4745ca9602d95b97f4fc7ba7f551717320b20da41396340 scored/data.parquet
cleaned/data.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:6c336138bc85d1c88066de1707de7e63331693c584ffdee0e980785bca855753
3
- size 16422979
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dbece47e97fa44fccba19d31ddd574cd069e0d843755c889ed757fe4e0dd0e62
3
+ size 15834185
filtered/data.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:dce11dc537c894976e13986ebb89f52337999a29e5db946a3abc19b2ddd76988
3
- size 18793907
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5473b45a4a0c3949c4539d2b3f4bbd6baaa676fa4ae2149e5878fefb5667fdca
3
+ size 18220398
metadata.json CHANGED
@@ -6,42 +6,41 @@
6
  "configs": {
7
  "cleaned": {
8
  "file": "cleaned/data.parquet",
9
- "version": "v6",
10
- "rows": 72007,
11
- "linked_article_pairs": 34566,
12
- "columns": ["ba_title", "ru_title", "section", "ba", "ru", "ba_sentence_index", "ru_sentence_index"]
 
13
  },
14
  "precleaned": {
15
  "file": "precleaned/data.parquet",
16
- "version": "v1",
17
- "rows": 91949,
18
- "columns": ["ba_title", "ru_title", "section", "ba", "ru"]
 
 
19
  },
20
  "scored": {
21
  "file": "scored/data.parquet",
22
- "version": "v7",
23
- "rows": 72007,
24
- "columns": ["ba_title", "ru_title", "section", "ba", "ru", "ba_sentence_index", "ru_sentence_index", "laser_cos", "laser_margin", "laser_margin_xling"],
 
25
  "scores": {
26
- "method": "LASER margin-based bitext scoring (Artetxe & Schwenk 2018)",
27
- "encoder_ba": "laser3-bak_Cyrl.v1",
28
- "encoder_ru": "laser2",
29
- "embedding_dim": 1024,
30
- "knn_k": 4,
31
- "note": "laser_margin uses same-language kNN, laser_margin_xling uses cross-lingual kNN and is the recommended LASER filter score"
32
  }
33
  },
34
  "filtered": {
35
  "file": "filtered/data.parquet",
36
- "version": "v8",
37
- "rows": 69706,
38
- "columns": ["ba_title", "ru_title", "section", "ba", "ru", "ba_sentence_index", "ru_sentence_index", "laser_cos", "laser_margin", "laser_margin_xling", "labse_cos", "labse_margin_xling"],
 
39
  "filter": {
40
- "name": "two_voice_both_low",
41
- "rule": "drop if laser_margin_xling < 0.876 AND labse_margin_xling < 0.723 (bottom 5% of both scorers)",
42
- "rows_dropped": 2301,
43
- "encoders": ["laser3-bak_Cyrl.v1 + laser2 (LASER3/LASER2, dim 1024)", "sentence-transformers/LaBSE (dim 768, fp16)"],
44
- "design": "pairs removed only when two independent encoders agree on rejection; all score columns retained for auditability"
45
  }
46
  }
47
  }
 
6
  "configs": {
7
  "cleaned": {
8
  "file": "cleaned/data.parquet",
9
+ "version": "v8.1",
10
+ "rows": 68737,
11
+ "linked_article_pairs": 33582,
12
+ "columns": ["ba_title", "ru_title", "section", "ba", "ru", "ba_sentence_index", "ru_sentence_index"],
13
+ "filter": "LID v3 verified (ba_prob >= 0.50); foreign text, duplicate and empty pairs removed"
14
  },
15
  "precleaned": {
16
  "file": "precleaned/data.parquet",
17
+ "version": "v1.1",
18
+ "rows": 84512,
19
+ "linked_article_pairs": 40705,
20
+ "columns": ["ba_title", "ru_title", "section", "ba", "ru"],
21
+ "filter": "LID v3 verified (ba_prob >= 0.50)"
22
  },
23
  "scored": {
24
  "file": "scored/data.parquet",
25
+ "version": "v8.1",
26
+ "rows": 68737,
27
+ "linked_article_pairs": 33582,
28
+ "columns": ["ba_title", "ru_title", "section", "ba", "ru", "ba_sentence_index", "ru_sentence_index", "laser_cos", "laser_margin", "laser_margin_xling", "pair_score"],
29
  "scores": {
30
+ "laser": "LASER margin-based bitext scoring (Artetxe & Schwenk 2018), laser3-bak_Cyrl.v1 + laser2",
31
+ "pair_score": "Bashkir-Russian Pair Scorer medium (ONNX fast128 cross-encoder compatibility score)"
 
 
 
 
32
  }
33
  },
34
  "filtered": {
35
  "file": "filtered/data.parquet",
36
+ "version": "v8.1",
37
+ "rows": 66498,
38
+ "linked_article_pairs": 31574,
39
+ "columns": ["ba_title", "ru_title", "section", "ba", "ru", "ba_sentence_index", "ru_sentence_index", "laser_cos", "laser_margin", "laser_margin_xling", "labse_cos", "labse_margin_xling", "pair_score"],
40
  "filter": {
41
+ "name": "lid_plus_two_voice",
42
+ "rule": "LID v3 (ba_prob >= 0.50) + two-voice (drop if laser_margin_xling < 0.876 AND labse_margin_xling < 0.723)",
43
+ "encoders": ["laser3-bak_Cyrl.v1 + laser2 (dim 1024)", "sentence-transformers/LaBSE (dim 768)", "bashkir-pair-scorer medium"]
 
 
44
  }
45
  }
46
  }
precleaned/data.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:61e960e1a122d45a5ae92b6d8116590cfb0b800bb54a815b2e3721406b2fa7a6
3
- size 20028563
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:842b68ff104f7befd20dbde56bc471d3e315100fc5cba1ab582dac16e6bdfff4
3
+ size 18789138
scored/data.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:021149d2899d06512ea0e20cb203a5ebf190e856ac96f1f18854c8c9f0e246c4
3
- size 18058017
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e479b053d5b05f1aa4745ca9602d95b97f4fc7ba7f551717320b20da41396340
3
+ size 17533851