Views
No views yet
>>id<< (id = valid target language ID), e.g. >>bas<<1from transformers import MarianMTModel, MarianTokenizer
2
3src_text = [
4 ">>bas<< Replace this with text in an accepted source language.",
5 ">>zul<< This is the second sentence."
6]
7
8model_name = "pytorch-models/opus-mt-tc-bible-big-deu_eng_fra_por_spa-bnt"
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) )1from transformers import pipeline
2pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-bible-big-deu_eng_fra_por_spa-bnt")
3print(pipe(">>bas<< Replace this with text in an accepted source language."))| langpair | testset | chr-F | BLEU | #sent | #words |
|---|---|---|---|---|---|
| eng-run | tatoeba-test-v2021-08-07 | 0.44207 | 11.8 | 1703 | 6710 |
| eng-swa | tatoeba-test-v2021-08-07 | 0.60298 | 32.7 | 387 | 1888 |
| fra-run | tatoeba-test-v2021-08-07 | 0.42664 | 11.2 | 1274 | 5081 |
| spa-run | tatoeba-test-v2021-08-07 | 0.41921 | 10.5 | 963 | 3886 |
| eng-lin | flores101-devtest | 0.43748 | 13.2 | 1012 | 26769 |
| eng-nso | flores101-devtest | 0.47122 | 19.4 | 1012 | 31298 |
| eng-sna | flores101-devtest | 0.44294 | 9.4 | 1012 | 20105 |
| eng-xho | flores101-devtest | 0.50110 | 11.6 | 1012 | 18227 |
| fra-sna | flores101-devtest | 0.40676 | 6.2 | 1012 | 20105 |
| por-lin | flores101-devtest | 0.41675 | 10.7 | 1012 | 26769 |
| spa-lin | flores101-devtest | 0.40631 | 8.8 | 1012 | 26769 |
| deu-lin | flores200-devtest | 0.40763 | 9.9 | 1012 | 26769 |
| deu-xho | flores200-devtest | 0.40586 | 4.8 | 1012 | 18227 |
| eng-kin | flores200-devtest | 0.41492 | 11.1 | 1012 | 22774 |
| eng-lin | flores200-devtest | 0.45568 | 14.7 | 1012 | 26769 |
| eng-nso | flores200-devtest | 0.48626 | 20.8 | 1012 | 31298 |
| eng-nya | flores200-devtest | 0.45067 | 10.7 | 1012 | 22180 |
| eng-sna | flores200-devtest | 0.45629 | 10.1 | 1012 | 20105 |
| eng-sot | flores200-devtest | 0.45331 | 15.4 | 1012 | 31600 |
| eng-ssw | flores200-devtest | 0.43635 | 7.1 | 1012 | 18508 |
| eng-tsn | flores200-devtest | 0.45233 | 17.7 | 1012 | 33831 |
| eng-tso | flores200-devtest | 0.48529 | 18.3 | 1012 | 29548 |
| eng-xho | flores200-devtest | 0.51974 | 13.1 | 1012 | 18227 |
| eng-zul | flores200-devtest | 0.53320 | 14.0 | 1012 | 18556 |
| fra-lin | flores200-devtest | 0.44410 | 13.0 | 1012 | 26769 |
| fra-sna | flores200-devtest | 0.42053 | 6.9 | 1012 | 20105 |
| fra-xho | flores200-devtest | 0.44537 | 7.1 | 1012 | 18227 |
| fra-zul | flores200-devtest | 0.41291 | 5.7 | 1012 | 18556 |
| por-lin | flores200-devtest | 0.42944 | 11.7 | 1012 | 26769 |
| por-xho | flores200-devtest | 0.41363 | 5.8 | 1012 | 18227 |
| spa-lin | flores200-devtest | 0.41938 | 9.4 | 1012 | 26769 |
| deu-swa | ntrex128 | 0.48979 | 18.0 | 1997 | 46859 |
| deu-tsn | ntrex128 | 0.41894 | 15.4 | 1997 | 71271 |
| eng-nya | ntrex128 | 0.46801 | 14.9 | 1997 | 43727 |
| eng-ssw | ntrex128 | 0.42880 | 6.7 | 1997 | 36169 |
| eng-swa | ntrex128 | 0.60117 | 33.4 | 1997 | 46859 |
| eng-tsn | ntrex128 | 0.46599 | 22.2 | 1997 | 71271 |
| eng-xho | ntrex128 | 0.48847 | 11.2 | 1997 | 35439 |
| eng-zul | ntrex128 | 0.49764 | 10.7 | 1997 | 34438 |
| fra-swa | ntrex128 | 0.45494 | 17.5 | 1997 | 46859 |
| fra-tsn | ntrex128 | 0.41426 | 15.3 | 1997 | 71271 |
| fra-xho | ntrex128 | 0.41206 | 5.2 | 1997 | 35439 |
| por-swa | ntrex128 | 0.46465 | 18.0 | 1997 | 46859 |
| por-tsn | ntrex128 | 0.40236 | 14.5 | 1997 | 71271 |
| por-xho | ntrex128 | 0.40070 | 5.0 | 1997 | 35439 |
| spa-swa | ntrex128 | 0.46670 | 18.1 | 1997 | 46859 |
| spa-tsn | ntrex128 | 0.40263 | 14.2 | 1997 | 71271 |
| spa-xho | ntrex128 | 0.40247 | 4.9 | 1997 | 35439 |
| eng-kin | tico19-test | 0.40952 | 11.3 | 2100 | 55034 |
| eng-lin | tico19-test | 0.44670 | 15.5 | 2100 | 61116 |
| eng-swa | tico19-test | 0.56798 | 28.0 | 2100 | 58846 |
| eng-zul | tico19-test | 0.53624 | 14.4 | 2100 | 44098 |
| fra-swa | tico19-test | 0.44926 | 16.8 | 2100 | 58846 |
| fra-zul | tico19-test | 0.40588 | 6.0 | 2100 | 44098 |
| por-lin | tico19-test | 0.41729 | 12.5 | 2100 | 61116 |
| por-swa | tico19-test | 0.49303 | 19.6 | 2100 | 58846 |
| spa-lin | tico19-test | 0.41645 | 12.1 | 2100 | 61116 |
| spa-swa | tico19-test | 0.48614 | 18.8 | 2100 | 58846 |
| spa-zul | tico19-test | 0.40058 | 5.3 | 2100 | 44098 |
1@article{tiedemann2023democratizing,
2 title={Democratizing neural machine translation with {OPUS-MT}},
3 author={Tiedemann, J{\"o}rg and Aulamo, Mikko and Bakshandaeva, Daria and Boggia, Michele and Gr{\"o}nroos, Stig-Arne and Nieminen, Tommi and Raganato, Alessandro and Scherrer, Yves and Vazquez, Raul and Virpioja, Sami},
4 journal={Language Resources and Evaluation},
5 number={58},
6 pages={713--755},
7 year={2023},
8 publisher={Springer Nature},
9 issn={1574-0218},
10 doi={10.1007/s10579-023-09704-w}
11}
12
13@inproceedings{tiedemann-thottingal-2020-opus,
14 title = "{OPUS}-{MT} {--} Building open translation services for the World",
15 author = {Tiedemann, J{\"o}rg and Thottingal, Santhosh},
16 booktitle = "Proceedings of the 22nd Annual Conference of the European Association for Machine Translation",
17 month = nov,
18 year = "2020",
19 address = "Lisboa, Portugal",
20 publisher = "European Association for Machine Translation",
21 url = "https://aclanthology.org/2020.eamt-1.61",
22 pages = "479--480",
23}
24
25@inproceedings{tiedemann-2020-tatoeba,
26 title = "The Tatoeba Translation Challenge {--} Realistic Data Sets for Low Resource and Multilingual {MT}",
27 author = {Tiedemann, J{\"o}rg},
28 booktitle = "Proceedings of the Fifth Conference on Machine Translation",
29 month = nov,
30 year = "2020",
31 address = "Online",
32 publisher = "Association for Computational Linguistics",
33 url = "https://aclanthology.org/2020.wmt-1.139",
34 pages = "1174--1182",
35}