aimamba commited on
Commit
33bc886
·
verified ·
1 Parent(s): 69f736b

Add dataset card

Browse files
Files changed (1) hide show
  1. README.md +105 -26
README.md CHANGED
@@ -1,31 +1,110 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  dataset_info:
3
  features:
4
- - name: en
5
- dtype: string
6
- - name: lv
7
- dtype: string
8
- - name: score
9
- dtype: float64
10
  splits:
11
- - name: train
12
- num_bytes: 163686105
13
- num_examples: 537732
14
- - name: validation
15
- num_bytes: 9093672
16
- num_examples: 29874
17
- - name: test
18
- num_bytes: 9093672
19
- num_examples: 29874
20
- download_size: 124377242
21
- dataset_size: 181873449
22
- configs:
23
- - config_name: default
24
- data_files:
25
- - split: train
26
- path: data/train-*
27
- - split: validation
28
- path: data/validation-*
29
- - split: test
30
- path: data/test-*
31
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
+ - lv
5
+ license: cc-by-sa-4.0
6
+ task_categories:
7
+ - translation
8
+ tags:
9
+ - parallel-corpus
10
+ - wikipedia
11
+ - wikimatrix
12
+ - en-lv
13
+ - latvian
14
+ - machine-translation
15
+ - labse
16
+ - faiss
17
+ size_categories:
18
+ - 100K<n<1M
19
+ source_datasets:
20
+ - wikipedia
21
+ pretty_name: WikiMatrix EN-LV
22
  dataset_info:
23
  features:
24
+ - name: en
25
+ dtype: string
26
+ - name: lv
27
+ dtype: string
28
+ - name: score
29
+ dtype: float64
30
  splits:
31
+ - name: train
32
+ num_examples: 537732
33
+ - name: validation
34
+ num_examples: 29874
35
+ - name: test
36
+ num_examples: 29874
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  ---
38
+
39
+ # WikiMatrix EN-LV
40
+
41
+ ## Dataset Description
42
+
43
+ **597,480** English-Latvian parallel sentence pairs mined from Wikipedia using the WikiMatrix methodology.
44
+
45
+ ### Method
46
+
47
+ 1. **Source**: English and Latvian Wikipedia article dumps (April 2026)
48
+ 2. **Embeddings**: [LaBSE](https://huggingface.co/sentence-transformers/LaBSE) (Language-agnostic BERT Sentence Embeddings)
49
+ 3. **Retrieval**: FAISS approximate nearest-neighbor search (IndexFlatIP)
50
+ 4. **Scoring**: Margin-based scoring — `margin(x, y) = cos(x, y) / [(Σ cos(x, nn_y) + Σ cos(y, nn_x)) / (2k)]`
51
+ 5. **Filtering**: Pairs with margin score ≥ 1.04 retained
52
+
53
+ ### Columns
54
+
55
+ | Column | Type | Description |
56
+ |--------|------|-------------|
57
+ | `en` | string | English sentence |
58
+ | `lv` | string | Latvian sentence |
59
+ | `score` | float | Margin similarity score (higher = more confident alignment) |
60
+
61
+ ### Splits
62
+
63
+ | Split | Examples |
64
+ |-------|----------|
65
+ | train | 537,732 |
66
+ | validation | 29,874 |
67
+ | test | 29,874 |
68
+
69
+ ### Quality Thresholds
70
+
71
+ The `score` column can be used to filter for higher-quality pairs:
72
+
73
+ | Threshold | Approx. Pairs | Quality |
74
+ |-----------|---------------|---------|
75
+ | ≥ 1.04 | 597,480 | All pairs (full dataset) |
76
+ | ≥ 1.06 | ~500,000 | **Recommended for training** |
77
+ | ≥ 1.10 | ~350,000 | High confidence |
78
+ | ≥ 1.20 | ~150,000 | Very high confidence |
79
+
80
+ ```python
81
+ from datasets import load_dataset
82
+
83
+ ds = load_dataset("aimamba/WikiMatrix-en-lv")
84
+
85
+ # Filter for high-quality pairs
86
+ high_quality = ds["train"].filter(lambda x: x["score"] >= 1.06)
87
+ print(f"High-quality pairs: {len(high_quality)}")
88
+ ```
89
+
90
+ ### License
91
+
92
+ CC-BY-SA 4.0 (inherited from Wikipedia)
93
+
94
+ ### Citation
95
+
96
+ ```bibtex
97
+ @misc{wikimatrix-en-lv-2026,
98
+ title={WikiMatrix EN-LV: English-Latvian Parallel Corpus from Wikipedia},
99
+ author={aimamba},
100
+ year={2026},
101
+ howpublished={\url{https://huggingface.co/datasets/aimamba/WikiMatrix-en-lv}},
102
+ note={597,480 sentence pairs mined using LaBSE + FAISS}
103
+ }
104
+ ```
105
+
106
+ ### Acknowledgments
107
+
108
+ - [LaBSE](https://arxiv.org/abs/2007.01852) — Feng et al., 2022
109
+ - [WikiMatrix](https://arxiv.org/abs/1907.05791) — Schwenk et al., 2019 (methodology inspiration)
110
+ - [FAISS](https://github.com/facebookresearch/faiss) — Facebook AI Research