语言:
- 保加利亚语
- 英语
标签:
- 翻译
- opus-mt-tc
许可证: cc-by-4.0
模型索引:
- 名称: opus-mt-tc-big-en-bg
结果:
- 任务:
名称: 英语到保加利亚语翻译
类型: 翻译
参数: eng-bul
数据集:
名称: flores101-devtest
类型: flores_101
参数: eng bul devtest
指标:
- 名称: BLEU
类型: bleu
值: 44.9
- 任务:
名称: 英语到保加利亚语翻译
类型: 翻译
参数: eng-bul
数据集:
名称: tatoeba-test-v2021-08-07
类型: tatoeba_mt
参数: eng-bul
指标:
- 名称: BLEU
类型: bleu
值: 51.5
opus-mt-tc-big-en-bg
用于从英语(en)翻译到保加利亚语(bg)的神经机器翻译模型。
该模型是OPUS-MT项目的一部分,该项目旨在使神经机器翻译模型在全球多种语言中广泛可用和易于获取。所有模型最初都是使用Marian NMT这一纯C++编写的高效NMT实现框架进行训练的。模型已通过huggingface的transformers库转换为pyTorch格式。训练数据取自OPUS,训练流程使用了OPUS-MT-train的程序。
@inproceedings{tiedemann-thottingal-2020-opus,
title = "{OPUS}-{MT} {--} 为世界构建开放的翻译服务",
author = {Tiedemann, J{\"o}rg 和 Thottingal, Santhosh},
booktitle = "第22届欧洲机器翻译协会年会论文集",
month = 11月,
year = "2020",
address = "葡萄牙里斯本",
publisher = "欧洲机器翻译协会",
url = "https://aclanthology.org/2020.eamt-1.61",
pages = "479--480",
}
@inproceedings{tiedemann-2020-tatoeba,
title = "Tatoeba翻译挑战 {--} 为低资源和多语言机器翻译提供真实数据集",
author = {Tiedemann, J{\"o}rg},
booktitle = "第五届机器翻译会议论文集",
month = 11月,
year = "2020",
address = "在线",
publisher = "计算语言学协会",
url = "https://aclanthology.org/2020.wmt-1.139",
pages = "1174--1182",
}
模型信息
使用示例
简短示例代码:
from transformers import MarianMTModel, MarianTokenizer
src_text = [
"2001 is the year when the 21st century begins.",
"This is Copacabana!"
]
model_name = "pytorch-models/opus-mt-tc-big-en-bg"
tokenizer = MarianTokenizer.from_pretrained(model_name)
model = MarianMTModel.from_pretrained(model_name)
translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
for t in translated:
print( tokenizer.decode(t, skip_special_tokens=True) )
也可以使用transformers的pipeline:
from transformers import pipeline
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-en-bg")
print(pipe("2001 is the year when the 21st century begins."))
基准测试
语言对 |
测试集 |
chr-F |
BLEU |
句子数 |
词数 |
eng-bul |
tatoeba-test-v2021-08-07 |
0.68987 |
51.5 |
10000 |
69504 |
eng-bul |
flores101-devtest |
0.69891 |
44.9 |
1012 |
24700 |
致谢
该工作由欧洲语言网格作为试点项目2866支持,由FoTran项目资助,该项目受欧洲研究理事会(ERC)根据欧盟Horizon 2020研究与创新计划(资助协议编号771113)资助,以及MeMAD项目,该项目受欧盟Horizon 2020研究与创新计划资助(资助协议编号780069)。我们也感谢CSC – 芬兰科学IT中心提供的慷慨计算资源和IT基础设施。
模型转换信息
- transformers版本:4.16.2
- OPUS-MT git哈希:3405783
- 转换时间:2022年4月13日星期三EEST 16:29:32
- 转换机器:LM0-400-22516.local