Views
No views yet
@inproceedings{tiedemann-thottingal-2020-opus,
title = "{OPUS}-{MT} {--} Building open translation services for the World",
author = {Tiedemann, J{\"o}rg and Thottingal, Santhosh},
booktitle = "Proceedings of the 22nd Annual Conference of the European Association for Machine Translation",
month = nov,
year = "2020",
address = "Lisboa, Portugal",
publisher = "European Association for Machine Translation",
url = "https://aclanthology.org/2020.eamt-1.61",
pages = "479--480",
}
@inproceedings{tiedemann-2020-tatoeba,
title = "The Tatoeba Translation Challenge {--} Realistic Data Sets for Low Resource and Multilingual {MT}",
author = {Tiedemann, J{\"o}rg},
booktitle = "Proceedings of the Fifth Conference on Machine Translation",
month = nov,
year = "2020",
address = "Online",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2020.wmt-1.139",
pages = "1174--1182",
}1from transformers import MarianMTModel, MarianTokenizer
2
3src_text = [
4 "Скільки мені слід купити пива?",
5 "Я клієнтка."
6]
7
8model_name = "pytorch-models/opus-mt-tc-big-zle-en"
9tokenizer = MarianTokenizer.from_pretrained(model_name)
10model = MarianMTModel.from_pretrained(model_name)
11translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
12
13for t in translated:
14 print( tokenizer.decode(t, skip_special_tokens=True) )
15
16# expected output:
17# How much beer should I buy?
18# I'm a client.1from transformers import pipeline
2pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-zle-en")
3print(pipe("Скільки мені слід купити пива?"))
4
5# expected output: How much beer should I buy?| langpair | testset | chr-F | BLEU | #sent | #words |
|---|---|---|---|---|---|
| bel-eng | tatoeba-test-v2021-08-07 | 0.65221 | 48.1 | 2500 | 18571 |
| rus-eng | tatoeba-test-v2021-08-07 | 0.71452 | 57.4 | 19425 | 147872 |
| ukr-eng | tatoeba-test-v2021-08-07 | 0.71162 | 56.9 | 13127 | 88607 |
| bel-eng | flores101-devtest | 0.51689 | 18.1 | 1012 | 24721 |
| rus-eng | flores101-devtest | 0.62581 | 35.2 | 1012 | 24721 |
| ukr-eng | flores101-devtest | 0.65001 | 39.2 | 1012 | 24721 |
| rus-eng | newstest2012 | 0.63724 | 39.2 | 3003 | 72812 |
| rus-eng | newstest2013 | 0.57641 | 31.3 | 3000 | 64505 |
| rus-eng | newstest2014 | 0.65667 | 40.5 | 3003 | 69190 |
| rus-eng | newstest2015 | 0.61747 | 36.1 | 2818 | 64428 |
| rus-eng | newstest2016 | 0.61414 | 35.7 | 2998 | 69278 |
| rus-eng | newstest2017 | 0.65365 | 40.8 | 3001 | 69025 |
| rus-eng | newstest2018 | 0.61386 | 35.2 | 3000 | 71291 |
| rus-eng | newstest2019 | 0.65476 | 41.6 | 2000 | 42642 |
| rus-eng | newstest2020 | 0.64878 | 36.9 | 991 | 20217 |
| rus-eng | newstestB2020 | 0.65685 | 39.3 | 991 | 20423 |
| rus-eng | tico19-test | 0.63280 | 33.3 | 2100 | 56323 |