aimamba/WikiMatrix-en-lv
收藏资源简介:
--- language: - en - lv license: cc-by-sa-4.0 task_categories: - translation tags: - parallel-corpus - wikipedia - wikimatrix - en-lv - latvian - machine-translation - labse - faiss size_categories: - 100K<n<1M source_datasets: - wikipedia pretty_name: WikiMatrix EN-LV dataset_info: features: - name: en dtype: string - name: lv dtype: string - name: score dtype: float64 splits: - name: train num_examples: 537732 - name: validation num_examples: 29874 - name: test num_examples: 29874 --- # WikiMatrix EN-LV ## Dataset Description **597,480** English-Latvian parallel sentence pairs mined from Wikipedia using the WikiMatrix methodology. ### Method 1. **Source**: English and Latvian Wikipedia article dumps (April 2026) 2. **Embeddings**: [LaBSE](https://huggingface.co/sentence-transformers/LaBSE) (Language-agnostic BERT Sentence Embeddings) 3. **Retrieval**: FAISS approximate nearest-neighbor search (IndexFlatIP) 4. **Scoring**: Margin-based scoring — `margin(x, y) = cos(x, y) / [(Σ cos(x, nn_y) + Σ cos(y, nn_x)) / (2k)]` 5. **Filtering**: Pairs with margin score ≥ 1.04 retained ### Columns | Column | Type | Description | |--------|------|-------------| | `en` | string | English sentence | | `lv` | string | Latvian sentence | | `score` | float | Margin similarity score (higher = more confident alignment) | ### Splits | Split | Examples | |-------|----------| | train | 537,732 | | validation | 29,874 | | test | 29,874 | ### Quality Thresholds The `score` column can be used to filter for higher-quality pairs: | Threshold | Approx. Pairs | Quality | |-----------|---------------|---------| | ≥ 1.04 | 597,480 | All pairs (full dataset) | | ≥ 1.06 | ~500,000 | **Recommended for training** | | ≥ 1.10 | ~350,000 | High confidence | | ≥ 1.20 | ~150,000 | Very high confidence | ```python from datasets import load_dataset ds = load_dataset("aimamba/WikiMatrix-en-lv") # Filter for high-quality pairs high_quality = ds["train"].filter(lambda x: x["score"] >= 1.06) print(f"High-quality pairs: {len(high_quality)}") ``` ### License CC-BY-SA 4.0 (inherited from Wikipedia) ### Citation ```bibtex @misc{wikimatrix-en-lv-2026, title={WikiMatrix EN-LV: English-Latvian Parallel Corpus from Wikipedia}, author={aimamba}, year={2026}, howpublished={\url{https://huggingface.co/datasets/aimamba/WikiMatrix-en-lv}}, note={597,480 sentence pairs mined using LaBSE + FAISS} } ``` ### Acknowledgments - [LaBSE](https://arxiv.org/abs/2007.01852) — Feng et al., 2022 - [WikiMatrix](https://arxiv.org/abs/1907.05791) — Schwenk et al., 2019 (methodology inspiration) - [FAISS](https://github.com/facebookresearch/faiss) — Facebook AI Research
--- ### 数据集元数据 - **语言**:英语(en)、拉脱维亚语(lv) - **许可协议**:CC-BY-SA-4.0 - **任务类别**:机器翻译 - **标签**:平行语料库、维基百科、WikiMatrix、en-lv、拉脱维亚语、机器翻译、LaBSE、FAISS - **规模区间**:100,000 < 样本数量 < 1,000,000 - **源数据集**:维基百科 - **数据集名称**:WikiMatrix EN-LV - **数据集信息**: - **特征字段**: 1. `en`:字符串类型,对应英语语句 2. `lv`:字符串类型,对应拉脱维亚语语句 3. `score`:float64类型,对应语句对齐得分 - **数据划分**: 1. 训练集(train):537,732条样本 2. 验证集(validation):29,874条样本 3. 测试集(test):29,874条样本 --- # WikiMatrix EN-LV ## 数据集描述 **597,480** 对英语-拉脱维亚语平行语句对,通过WikiMatrix方法从维基百科中挖掘得到。 ### 方法流程 1. **数据源**:2026年4月发布的英语与拉脱维亚语维基百科文章备份快照 2. **句嵌入生成**:LaBSE(Language-agnostic BERT Sentence Embeddings,语言无关BERT句嵌入) 3. **相似度检索**:采用FAISS近似最近邻搜索(IndexFlatIP) 4. **得分计算**:基于边际的相似度得分公式为:`margin(x, y) = cos(x, y) / [(Σ cos(x, nn_y) + Σ cos(y, nn_x)) / (2k)]` 5. **数据过滤**:仅保留边际得分≥1.04的语句对 ### 字段说明 | 字段名 | 数据类型 | 描述 | |--------|----------|------| | `en` | 字符串 | 英语语句 | | `lv` | 字符串 | 拉脱维亚语语句 | | `score` | 浮点数 | 边际相似度得分,得分越高代表语句对齐的置信度越高 | ### 数据划分详情 | 划分名称 | 样本数量 | |----------|----------| | train | 537,732 | | validation | 29,874 | | test | 29,874 | ### 质量阈值 `score`字段可用于筛选更高质量的语句对,具体阈值与对应质量等级如下: | 阈值 | 近似样本数 | 质量等级 | |------|------------|----------| | ≥ 1.04 | 597,480 | 全量数据集 | | ≥ 1.06 | ~500,000 | **推荐用于训练** | | ≥ 1.10 | ~350,000 | 高置信度 | | ≥ 1.20 | ~150,000 | 极高置信度 | python from datasets import load_dataset ds = load_dataset("aimamba/WikiMatrix-en-lv") # 筛选高质量语句对 high_quality = ds["train"].filter(lambda x: x["score"] >= 1.06) print(f"高质量语句对数量:{len(high_quality)}") ### 许可协议 CC-BY-SA 4.0(继承自维基百科的许可协议) ### 引用格式 bibtex @misc{wikimatrix-en-lv-2026, title={WikiMatrix EN-LV: English-Latvian Parallel Corpus from Wikipedia}, author={aimamba}, year={2026}, howpublished={\url{https://huggingface.co/datasets/aimamba/WikiMatrix-en-lv}}, note={597,480 sentence pairs mined using LaBSE + FAISS} } ### 致谢 - LaBSE(Language-agnostic BERT Sentence Embeddings)—— Feng 等,2022,原论文:https://arxiv.org/abs/2007.01852 - WikiMatrix—— Schwenk 等,2019(本数据集方法的灵感来源),原论文:https://arxiv.org/abs/1907.05791 - FAISS—— Facebook人工智能研究院(Facebook AI Research),开源仓库:https://github.com/facebookresearch/faiss



