Views
No views yet
>>id<< (id = valid target language ID), e.g. >>anp<<1from transformers import MarianMTModel, MarianTokenizer
2
3src_text = [
4 ">>anp<< Replace this with text in an accepted source language.",
5 ">>zza<< This is the second sentence."
6]
7
8model_name = "pytorch-models/opus-mt-tc-bible-big-deu_eng_fra_por_spa-iir"
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-iir")
3print(pipe(">>anp<< Replace this with text in an accepted source language."))| langpair | testset | chr-F | BLEU | #sent | #words |
|---|---|---|---|---|---|
| deu-fas | tatoeba-test-v2021-08-07 | 0.45763 | 20.3 | 3185 | 24941 |
| deu-kur_Latn | tatoeba-test-v2021-08-07 | 1.027 | 0.6 | 223 | 1249 |
| eng-ben | tatoeba-test-v2021-08-07 | 0.47927 | 17.6 | 2500 | 11654 |
| eng-fas | tatoeba-test-v2021-08-07 | 0.40192 | 17.1 | 3762 | 31110 |
| eng-hin | tatoeba-test-v2021-08-07 | 0.52525 | 28.4 | 5000 | 32904 |
| eng-kur_Latn | tatoeba-test-v2021-08-07 | 0.493 | 0.0 | 290 | 1682 |
| eng-mar | tatoeba-test-v2021-08-07 | 0.52549 | 24.4 | 10396 | 61140 |
| eng-pes | tatoeba-test-v2021-08-07 | 0.40401 | 17.3 | 3757 | 31044 |
| eng-urd | tatoeba-test-v2021-08-07 | 0.45764 | 18.1 | 1663 | 12155 |
| fra-fas | tatoeba-test-v2021-08-07 | 0.42414 | 18.9 | 376 | 3217 |
| deu-npi | flores101-devtest | 3.082 | 0.2 | 1012 | 19762 |
| eng-ben | flores101-devtest | 0.51055 | 17.0 | 1012 | 21155 |
| eng-ckb | flores101-devtest | 0.45337 | 7.1 | 1012 | 21159 |
| eng-guj | flores101-devtest | 0.53972 | 22.3 | 1012 | 23840 |
| eng-hin | flores101-devtest | 0.57980 | 33.4 | 1012 | 27743 |
| eng-mar | flores101-devtest | 0.48206 | 14.3 | 1012 | 21810 |
| eng-urd | flores101-devtest | 0.48050 | 20.5 | 1012 | 28098 |
| fra-ben | flores101-devtest | 0.43806 | 10.9 | 1012 | 21155 |
| fra-ckb | flores101-devtest | 0.41016 | 4.9 | 1012 | 21159 |
| por-ben | flores101-devtest | 0.42730 | 10.0 | 1012 | 21155 |
| por-npi | flores101-devtest | 2.084 | 0.2 | 1012 | 19762 |
| spa-hin | flores101-devtest | 0.43371 | 16.0 | 1012 | 27743 |
| deu-ben | flores200-devtest | 0.44005 | 10.6 | 1012 | 21155 |
| deu-hin | flores200-devtest | 0.48448 | 22.3 | 1012 | 27743 |
| deu-hne | flores200-devtest | 0.42659 | 13.8 | 1012 | 26582 |
| deu-mag | flores200-devtest | 0.42477 | 14.0 | 1012 | 26516 |
| deu-npi | flores200-devtest | 5.870 | 0.1 | 1012 | 19762 |
| deu-pes | flores200-devtest | 0.42726 | 14.9 | 1012 | 24986 |
| deu-tgk | flores200-devtest | 0.40932 | 12.9 | 1012 | 25530 |
| deu-urd | flores200-devtest | 0.41250 | 14.4 | 1012 | 28098 |
| eng-ben | flores200-devtest | 0.51361 | 17.1 | 1012 | 21155 |
| eng-ckb | flores200-devtest | 0.45750 | 7.7 | 1012 | 21152 |
| eng-guj | flores200-devtest | 0.54231 | 22.4 | 1012 | 23840 |
| eng-hin | flores200-devtest | 0.58371 | 33.7 | 1012 | 27743 |
| eng-hne | flores200-devtest | 0.47591 | 19.9 | 1012 | 26582 |
| eng-mag | flores200-devtest | 0.51070 | 22.2 | 1012 | 26516 |
| eng-mar | flores200-devtest | 0.48733 | 14.8 | 1012 | 21810 |
| eng-pan | flores200-devtest | 0.45015 | 18.1 | 1012 | 27451 |
| eng-pes | flores200-devtest | 0.48588 | 21.1 | 1012 | 24986 |
| eng-prs | flores200-devtest | 0.51879 | 24.5 | 1012 | 25885 |
| eng-sin | flores200-devtest | 0.43823 | 10.6 | 1012 | 23278 |
| eng-tgk | flores200-devtest | 0.47323 | 17.8 | 1012 | 25530 |
| eng-urd | flores200-devtest | 0.48212 | 20.4 | 1012 | 28098 |
| fra-ben | flores200-devtest | 0.44029 | 11.0 | 1012 | 21155 |
| fra-ckb | flores200-devtest | 0.41353 | 5.3 | 1012 | 21152 |
| fra-hin | flores200-devtest | 0.48406 | 22.6 | 1012 | 27743 |
| fra-hne | flores200-devtest | 0.42353 | 13.9 | 1012 | 26582 |
| fra-mag | flores200-devtest | 0.42678 | 14.3 | 1012 | 26516 |
| fra-npi | flores200-devtest | 6.525 | 0.1 | 1012 | 19762 |
| fra-pes | flores200-devtest | 0.43526 | 15.5 | 1012 | 24986 |
| fra-tgk | flores200-devtest | 0.42982 | 13.7 | 1012 | 25530 |
| fra-urd | flores200-devtest | 0.41438 | 14.2 | 1012 | 28098 |
| por-ben | flores200-devtest | 0.43390 | 10.4 | 1012 | 21155 |
| por-ckb | flores200-devtest | 0.42303 | 5.6 | 1012 | 21152 |
| por-hin | flores200-devtest | 0.49524 | 23.6 | 1012 | 27743 |
| por-hne | flores200-devtest | 0.42269 | 13.9 | 1012 | 26582 |
| por-mag | flores200-devtest | 0.42753 | 15.0 | 1012 | 26516 |
| por-npi | flores200-devtest | 6.737 | 0.1 | 1012 | 19762 |
| por-pes | flores200-devtest | 0.43194 | 15.4 | 1012 | 24986 |
| por-tgk | flores200-devtest | 0.41860 | 13.2 | 1012 | 25530 |
| por-urd | flores200-devtest | 0.41799 | 14.8 | 1012 | 28098 |
| spa-ben | flores200-devtest | 0.41893 | 8.3 | 1012 | 21155 |
| spa-hin | flores200-devtest | 0.43777 | 16.4 | 1012 | 27743 |
| spa-kas_Arab | flores200-devtest | 9.380 | 0.1 | 1012 | 23514 |
| spa-npi | flores200-devtest | 7.518 | 0.2 | 1012 | 19762 |
| spa-pes | flores200-devtest | 0.40856 | 12.2 | 1012 | 24986 |
| spa-prs | flores200-devtest | 0.40361 | 12.8 | 1012 | 25885 |
| spa-tgk | flores200-devtest | 0.40100 | 10.8 | 1012 | 25530 |
| eng-hin | newstest2014 | 0.51249 | 23.6 | 2507 | 60872 |
| eng-guj | newstest2019 | 0.57282 | 25.5 | 998 | 21924 |
| deu-ben | ntrex128 | 0.43971 | 9.6 | 1997 | 40095 |
| deu-fas | ntrex128 | 0.41469 | 13.8 | 1997 | 50525 |
| deu-hin | ntrex128 | 0.42940 | 16.8 | 1997 | 55219 |
| deu-snd_Arab | ntrex128 | 6.129 | 0.1 | 1997 | 49866 |
| deu-urd | ntrex128 | 0.41881 | 14.5 | 1997 | 54259 |
| eng-ben | ntrex128 | 0.51555 | 16.6 | 1997 | 40095 |
| eng-fas | ntrex128 | 0.46895 | 19.7 | 1997 | 50525 |
| eng-guj | ntrex128 | 0.48990 | 17.1 | 1997 | 45335 |
| eng-hin | ntrex128 | 0.52307 | 26.9 | 1997 | 55219 |
| eng-mar | ntrex128 | 0.44580 | 10.4 | 1997 | 42375 |
| eng-nep | ntrex128 | 0.42955 | 8.4 | 1997 | 40570 |
| eng-pan | ntrex128 | 0.46141 | 19.6 | 1997 | 54355 |
| eng-sin | ntrex128 | 0.42236 | 9.7 | 1997 | 44429 |
| eng-snd_Arab | ntrex128 | 1.932 | 0.1 | 1997 | 49866 |
| eng-urd | ntrex128 | 0.49646 | 22.1 | 1997 | 54259 |
| fra-ben | ntrex128 | 0.41716 | 8.9 | 1997 | 40095 |
| fra-fas | ntrex128 | 0.41282 | 13.8 | 1997 | 50525 |
| fra-hin | ntrex128 | 0.42475 | 17.1 | 1997 | 55219 |
| fra-snd_Arab | ntrex128 | 6.047 | 0.0 | 1997 | 49866 |
| fra-urd | ntrex128 | 0.41536 | 14.8 | 1997 | 54259 |
| por-ben | ntrex128 | 0.43855 | 9.9 | 1997 | 40095 |
| por-fas | ntrex128 | 0.42010 | 14.4 | 1997 | 50525 |
| por-hin | ntrex128 | 0.43275 | 17.6 | 1997 | 55219 |
| por-snd_Arab | ntrex128 | 6.336 | 0.1 | 1997 | 49866 |
| por-urd | ntrex128 | 0.42484 | 15.2 | 1997 | 54259 |
| spa-ben | ntrex128 | 0.44905 | 10.3 | 1997 | 40095 |
| spa-fas | ntrex128 | 0.42207 | 14.1 | 1997 | 50525 |
| spa-hin | ntrex128 | 0.43380 | 17.6 | 1997 | 55219 |
| spa-snd_Arab | ntrex128 | 5.551 | 0.0 | 1997 | 49866 |
| spa-urd | ntrex128 | 0.42434 | 15.0 | 1997 | 54259 |
| eng-ben | tico19-test | 0.51563 | 17.9 | 2100 | 51695 |
| eng-ckb | tico19-test | 0.46188 | 8.9 | 2100 | 50500 |
| eng-fas | tico19-test | 0.53182 | 25.8 | 2100 | 59779 |
| eng-hin | tico19-test | 0.63128 | 41.6 | 2100 | 62680 |
| eng-mar | tico19-test | 0.45619 | 12.9 | 2100 | 50872 |
| eng-nep | tico19-test | 0.53413 | 17.6 | 2100 | 48363 |
| eng-prs | tico19-test | 0.44101 | 17.3 | 2100 | 62972 |
| eng-pus | tico19-test | 0.47063 | 20.5 | 2100 | 66213 |
| eng-urd | tico19-test | 0.51054 | 22.0 | 2100 | 65312 |
| fra-fas | tico19-test | 0.43476 | 17.9 | 2100 | 59779 |
| fra-hin | tico19-test | 0.48625 | 25.6 | 2100 | 62680 |
| fra-nep | tico19-test | 0.41153 | 9.7 | 2100 | 48363 |
| fra-urd | tico19-test | 0.40482 | 14.4 | 2100 | 65312 |
| por-ben | tico19-test | 0.45814 | 12.5 | 2100 | 51695 |
| por-ckb | tico19-test | 0.41684 | 5.6 | 2100 | 50500 |
| por-fas | tico19-test | 0.49181 | 21.3 | 2100 | 59779 |
| por-hin | tico19-test | 0.55759 | 31.1 | 2100 | 62680 |
| por-mar | tico19-test | 0.40067 | 9.1 | 2100 | 50872 |
| por-nep | tico19-test | 0.47378 | 12.1 | 2100 | 48363 |
| por-pus | tico19-test | 0.42496 | 15.9 | 2100 | 66213 |
| por-urd | tico19-test | 0.45560 | 16.6 | 2100 | 65312 |
| spa-ben | tico19-test | 0.45751 | 12.7 | 2100 | 51695 |
| spa-ckb | tico19-test | 0.41568 | 5.4 | 2100 | 50500 |
| spa-fas | tico19-test | 0.48974 | 21.0 | 2100 | 59779 |
| spa-hin | tico19-test | 0.55641 | 30.9 | 2100 | 62680 |
| spa-mar | tico19-test | 0.40329 | 9.4 | 2100 | 50872 |
| spa-nep | tico19-test | 0.47164 | 12.1 | 2100 | 48363 |
| spa-prs | tico19-test | 0.41879 | 14.3 | 2100 | 62972 |
| spa-pus | tico19-test | 0.41714 | 15.1 | 2100 | 66213 |
| spa-urd | tico19-test | 0.44931 | 15.3 | 2100 | 65312 |
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}