Views
No views yet
>>id<< (id = valid target language ID), e.g. >>deu<<1from transformers import MarianMTModel, MarianTokenizer
2
3src_text = [
4 ">>deu<< Replace this with text in an accepted source language.",
5 ">>spa<< This is the second sentence."
6]
7
8model_name = "pytorch-models/opus-mt-tc-bible-big-bnt-deu_eng_fra_por_spa"
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-bnt-deu_eng_fra_por_spa")
3print(pipe(">>deu<< Replace this with text in an accepted source language."))| langpair | testset | chr-F | BLEU | #sent | #words |
|---|---|---|---|---|---|
| run-deu | tatoeba-test-v2021-08-07 | 0.43836 | 26.1 | 1752 | 10562 |
| run-eng | tatoeba-test-v2021-08-07 | 0.54089 | 39.4 | 1703 | 10041 |
| run-fra | tatoeba-test-v2021-08-07 | 0.46240 | 26.1 | 1274 | 7479 |
| run-spa | tatoeba-test-v2021-08-07 | 0.46496 | 25.8 | 963 | 5167 |
| swa-eng | tatoeba-test-v2021-08-07 | 0.59947 | 45.9 | 387 | 2508 |
| lin-eng | flores101-devtest | 0.40858 | 16.9 | 1012 | 24721 |
| nso-eng | flores101-devtest | 0.49866 | 26.5 | 1012 | 24721 |
| sna-fra | flores101-devtest | 0.40134 | 14.3 | 1012 | 28343 |
| swh-deu | flores101-devtest | 0.43073 | 14.2 | 1012 | 25094 |
| zul-fra | flores101-devtest | 0.43723 | 17.4 | 1012 | 28343 |
| zul-por | flores101-devtest | 0.41886 | 15.9 | 1012 | 26519 |
| bem-eng | flores200-devtest | 0.42350 | 18.1 | 1012 | 24721 |
| kin-eng | flores200-devtest | 0.46183 | 21.9 | 1012 | 24721 |
| kin-fra | flores200-devtest | 0.40139 | 14.7 | 1012 | 28343 |
| lin-eng | flores200-devtest | 0.42073 | 18.1 | 1012 | 24721 |
| nso-eng | flores200-devtest | 0.51453 | 28.4 | 1012 | 24721 |
| nso-fra | flores200-devtest | 0.41065 | 16.1 | 1012 | 28343 |
| nya-eng | flores200-devtest | 0.44398 | 20.2 | 1012 | 24721 |
| run-eng | flores200-devtest | 0.42987 | 18.9 | 1012 | 24721 |
| sna-eng | flores200-devtest | 0.45917 | 21.1 | 1012 | 24721 |
| sna-fra | flores200-devtest | 0.41153 | 15.2 | 1012 | 28343 |
| sot-eng | flores200-devtest | 0.51854 | 26.9 | 1012 | 24721 |
| sot-fra | flores200-devtest | 0.41340 | 15.8 | 1012 | 28343 |
| ssw-eng | flores200-devtest | 0.44925 | 20.7 | 1012 | 24721 |
| swh-deu | flores200-devtest | 0.44937 | 15.6 | 1012 | 25094 |
| swh-eng | flores200-devtest | 0.60107 | 37.0 | 1012 | 24721 |
| swh-fra | flores200-devtest | 0.50257 | 23.5 | 1012 | 28343 |
| swh-por | flores200-devtest | 0.49475 | 22.8 | 1012 | 26519 |
| swh-spa | flores200-devtest | 0.42866 | 15.3 | 1012 | 29199 |
| tsn-eng | flores200-devtest | 0.45365 | 19.9 | 1012 | 24721 |
| tso-eng | flores200-devtest | 0.46882 | 22.8 | 1012 | 24721 |
| xho-eng | flores200-devtest | 0.52500 | 28.8 | 1012 | 24721 |
| xho-fra | flores200-devtest | 0.44642 | 18.7 | 1012 | 28343 |
| xho-por | flores200-devtest | 0.42517 | 16.8 | 1012 | 26519 |
| zul-eng | flores200-devtest | 0.53428 | 29.5 | 1012 | 24721 |
| zul-fra | flores200-devtest | 0.45383 | 19.0 | 1012 | 28343 |
| zul-por | flores200-devtest | 0.43537 | 17.4 | 1012 | 26519 |
| bem-eng | ntrex128 | 0.43168 | 19.1 | 1997 | 47673 |
| kin-eng | ntrex128 | 0.46996 | 20.8 | 1997 | 47673 |
| kin-fra | ntrex128 | 0.40765 | 14.7 | 1997 | 53481 |
| kin-spa | ntrex128 | 0.41552 | 15.9 | 1997 | 54107 |
| nde-eng | ntrex128 | 0.42744 | 17.1 | 1997 | 47673 |
| nso-eng | ntrex128 | 0.47231 | 21.5 | 1997 | 47673 |
| nso-spa | ntrex128 | 0.40135 | 15.2 | 1997 | 54107 |
| nya-eng | ntrex128 | 0.47072 | 23.3 | 1997 | 47673 |
| nya-spa | ntrex128 | 0.41006 | 16.2 | 1997 | 54107 |
| ssw-eng | ntrex128 | 0.48682 | 23.5 | 1997 | 47673 |
| ssw-spa | ntrex128 | 0.40839 | 15.9 | 1997 | 54107 |
| swa-deu | ntrex128 | 0.43880 | 14.1 | 1997 | 48761 |
| swa-eng | ntrex128 | 0.58527 | 35.4 | 1997 | 47673 |
| swa-fra | ntrex128 | 0.47344 | 19.7 | 1997 | 53481 |
| swa-por | ntrex128 | 0.46292 | 19.1 | 1997 | 51631 |
| swa-spa | ntrex128 | 0.48780 | 22.9 | 1997 | 54107 |
| tsn-eng | ntrex128 | 0.50413 | 25.3 | 1997 | 47673 |
| tsn-fra | ntrex128 | 0.41912 | 15.8 | 1997 | 53481 |
| tsn-por | ntrex128 | 0.41090 | 15.3 | 1997 | 51631 |
| tsn-spa | ntrex128 | 0.42979 | 17.7 | 1997 | 54107 |
| ven-eng | ntrex128 | 0.43364 | 18.4 | 1997 | 47673 |
| xho-eng | ntrex128 | 0.50778 | 26.5 | 1997 | 47673 |
| xho-fra | ntrex128 | 0.41066 | 15.1 | 1997 | 53481 |
| xho-spa | ntrex128 | 0.42129 | 16.7 | 1997 | 54107 |
| zul-eng | ntrex128 | 0.50361 | 26.9 | 1997 | 47673 |
| zul-fra | ntrex128 | 0.40779 | 15.0 | 1997 | 53481 |
| zul-spa | ntrex128 | 0.41836 | 16.9 | 1997 | 54107 |
| kin-eng | tico19-test | 0.42280 | 18.8 | 2100 | 56323 |
| lin-eng | tico19-test | 0.41495 | 18.4 | 2100 | 56323 |
| lug-eng | tico19-test | 0.43948 | 22.2 | 2100 | 56323 |
| swa-eng | tico19-test | 0.58126 | 34.5 | 2100 | 56315 |
| swa-fra | tico19-test | 0.46470 | 20.5 | 2100 | 64661 |
| swa-por | tico19-test | 0.49374 | 22.8 | 2100 | 62729 |
| swa-spa | tico19-test | 0.50214 | 24.5 | 2100 | 66563 |
| zul-eng | tico19-test | 0.55678 | 32.2 | 2100 | 56804 |
| zul-fra | tico19-test | 0.43797 | 18.6 | 2100 | 64661 |
| zul-por | tico19-test | 0.45560 | 19.9 | 2100 | 62729 |
| zul-spa | tico19-test | 0.46505 | 21.4 | 2100 | 66563 |
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}