大规模翻译数据挖掘。
项目描述
stopes
:用于准备机器翻译研究数据的库
作为FAIR No Language Left Behind (NLLB)(《论文》,《网站》,《博客》)项目的一部分,该项目旨在通过机器翻译促进包容性,我们处理了大量数据以创建训练数据。我们提供了我们使用的库和工具,以
- 从网络数据创建干净的单一语言数据
- 挖掘双语文本
- 轻松编写可扩展的管道来处理机器翻译数据
有关完整文档,请参阅https://facebookresearch.github.io/stopes
示例
请查看demo
目录,了解如何使用WMT22 共享任务:非洲语言大规模机器翻译评估数据。
要求
stopes
依赖于
- 在集群上运行时提交到调度任务
- 配置需要hydra-core版本 >= 1.2.0
- 使用LASER编码器需要fairseq
- PyTorch版本 >= 1.5.0
- Python版本 >= 3.8
安装stopes
stopes使用flit来管理其设置,您需要一个较新的pip版本才能使安装工作。我们建议您首先升级pip:python -m pip install --upgrade pip
您可以使用pip安装stopes:pip install -e '.[dev,mono,mining]'
您可以选择要安装的内容。如果您只对mining
感兴趣,则不需要安装dev
和mono
。
挖掘管道依赖于fairseq来运行LASER编码器,pip目前无法安装fairseq,因此您必须手动进行。请查看fairseq存储库以获取最新说明和要求。
git clone https://github.com/pytorch/fairseq
cd fairseq
pip install --editable ./
如果您计划训练大量NMT模型,您还希望设置apex以获得更快的训练。
git clone https://github.com/NVIDIA/apex
cd apex
pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" \
--global-option="--deprecated_fused_adam" --global-option="--xentropy" \
--global-option="--fast_multihead_attn" ./
stopes
的工作方式
stopes
由几个不同的部分组成
core
提供了一个库来编写可读的管道modules
提供了一套使用核心库并实现我们挖掘和评估管道中常用步骤的模块pipelines
为我们使用的NLLB中的数据管道提供管道实现
monolingual
用于预处理和清理单语言数据bitext
用于运行“全局挖掘”管道并从两个单语言数据集中提取对齐句子。(受CCMatric启发)
完整文档:请参阅https://facebookresearch.github.io/stopes或websites/docs
文件夹。
贡献
请参阅CONTRIBUTING文件了解如何帮助。
贡献者
- Pierre Andrews
- Onur Çelebi
- Angela Fan
- Vedanuj Goswami
- Kevin Heffernan
- Ammar Kamran
- Jean Maillard
- Alexandre Mourachko
- Kaushik Ram Sadagopan
- Holger Schwenk
- Guillaume Wenzek
(按字母顺序排列)
引用
如果您在您的作品中使用了stopes
或NLLB中发布的任何模型/数据集/工件,请引用
@article{nllb2022,
title={No Language Left Behind: Scaling Human-Centered Machine Translation},
author={{NLLB Team} and Costa-jussà, Marta R. and Cross, James and Çelebi, Onur and Elbayad, Maha and Heafield, Kenneth and Heffernan, Kevin and Kalbassi, Elahe and Lam, Janice and Licht, Daniel and Maillard, Jean and Sun, Anna and Wang, Skyler and Wenzek, Guillaume and Youngblood, Al and Akula, Bapi and Barrault, Loic and Mejia-Gonzalez, Gabriel and Hansanti, Prangthip and Hoffman, John and Jarrett, Semarley and Sadagopan, Kaushik Ram and Rowe, Dirk and Spruit, Shannon and Tran, Chau and Andrews, Pierre and Ayan, Necip Fazil and Bhosale, Shruti and Edunov, Sergey and Fan, Angela and Gao, Cynthia and Goswami, Vedanuj and Guzmán, Francisco and Koehn, Philipp and Mourachko, Alexandre and Ropers, Christophe and Saleem, Safiyyah and Schwenk, Holger and Wang, Jeff},
year={2022}
}
许可
stopes
是MIT许可,如LICENSE文件中所示。
项目详情
下载文件
下载适用于您平台的应用程序。如果您不确定要选择哪个,请了解有关安装包的更多信息。
源分发
stopes-1.0.1.tar.gz (736.6 KB 查看哈希值)
构建分发
stopes-1.0.1-py3-none-any.whl (202.7 KB 查看哈希值)
关闭
stopes-1.0.1.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 6e0171b30ebc846ba7d4f53e2f195533cc3131dc304fa31b6e61483e60076ee9 |
|
MD5 | d0f9db9f22fe061765844c101898991c |
|
BLAKE2b-256 | b4201f2c93dc1a3113a864797a9bfe21b956aa620e7d7be4948d1fcb71aaaf29 |
关闭
stopes-1.0.1-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | b8646f70af05000617294bc9dc0ee8e187a31e451e1ff05933c53b899cc7767f |
|
MD5 | f6183aa32ca47411e968573d72c73020 |
|
BLAKE2b-256 | 10ab1519873ec14ecfd7779696639c672103432212b9a88ba175032ceb059dff |