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-ira-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-ira-deu_eng_fra_por_spa")
3print(pipe(">>deu<< Replace this with text in an accepted source language."))| langpair | testset | chr-F | BLEU | #sent | #words |
|---|---|---|---|---|---|
| fas-deu | tatoeba-test-v2021-08-07 | 0.59737 | 36.1 | 3185 | 25590 |
| fas-eng | tatoeba-test-v2021-08-07 | 0.59871 | 35.8 | 3762 | 31480 |
| fas-fra | tatoeba-test-v2021-08-07 | 0.58095 | 36.3 | 376 | 3377 |
| kur_Latn-deu | tatoeba-test-v2021-08-07 | 0.40276 | 24.9 | 223 | 1323 |
| pes-eng | tatoeba-test-v2021-08-07 | 0.60717 | 42.3 | 3757 | 31411 |
| ckb-deu | flores101-devtest | 0.40117 | 11.6 | 1012 | 25094 |
| ckb-eng | flores101-devtest | 0.48321 | 21.6 | 1012 | 24721 |
| ckb-fra | flores101-devtest | 0.44260 | 17.2 | 1012 | 28343 |
| ckb-por | flores101-devtest | 0.43179 | 16.2 | 1012 | 26519 |
| fas-eng | flores101-devtest | 0.61134 | 34.4 | 1012 | 24721 |
| pus-eng | flores101-devtest | 0.49556 | 22.7 | 1012 | 24721 |
| pus-fra | flores101-devtest | 0.45248 | 17.8 | 1012 | 28343 |
| tgk-eng | flores101-devtest | 0.53630 | 25.4 | 1012 | 24721 |
| tgk-fra | flores101-devtest | 0.49084 | 21.0 | 1012 | 28343 |
| tgk-spa | flores101-devtest | 0.43524 | 15.5 | 1012 | 29199 |
| ckb-deu | flores200-devtest | 0.40369 | 11.7 | 1012 | 25094 |
| ckb-eng | flores200-devtest | 0.48447 | 21.5 | 1012 | 24721 |
| ckb-fra | flores200-devtest | 0.44026 | 17.1 | 1012 | 28343 |
| ckb-por | flores200-devtest | 0.43192 | 16.4 | 1012 | 26519 |
| pes-deu | flores200-devtest | 0.51542 | 21.5 | 1012 | 25094 |
| pes-eng | flores200-devtest | 0.61372 | 34.9 | 1012 | 24721 |
| pes-fra | flores200-devtest | 0.56347 | 29.2 | 1012 | 28343 |
| pes-por | flores200-devtest | 0.55676 | 28.5 | 1012 | 26519 |
| pes-spa | flores200-devtest | 0.48334 | 19.8 | 1012 | 29199 |
| prs-deu | flores200-devtest | 0.50562 | 21.2 | 1012 | 25094 |
| prs-eng | flores200-devtest | 0.60716 | 35.1 | 1012 | 24721 |
| prs-fra | flores200-devtest | 0.54769 | 27.8 | 1012 | 28343 |
| prs-por | flores200-devtest | 0.54073 | 27.2 | 1012 | 26519 |
| prs-spa | flores200-devtest | 0.46850 | 18.6 | 1012 | 29199 |
| tgk-deu | flores200-devtest | 0.43115 | 14.2 | 1012 | 25094 |
| tgk-eng | flores200-devtest | 0.53705 | 25.6 | 1012 | 24721 |
| tgk-fra | flores200-devtest | 0.48902 | 20.7 | 1012 | 28343 |
| tgk-por | flores200-devtest | 0.48519 | 20.7 | 1012 | 26519 |
| tgk-spa | flores200-devtest | 0.43563 | 15.7 | 1012 | 29199 |
| fas-deu | ntrex128 | 0.47408 | 16.7 | 1997 | 48761 |
| fas-eng | ntrex128 | 0.55350 | 26.4 | 1997 | 47673 |
| fas-fra | ntrex128 | 0.50311 | 22.1 | 1997 | 53481 |
| fas-por | ntrex128 | 0.48005 | 19.1 | 1997 | 51631 |
| fas-spa | ntrex128 | 0.50973 | 23.6 | 1997 | 54107 |
| prs-deu | ntrex128 | 0.45191 | 14.9 | 1997 | 48761 |
| prs-eng | ntrex128 | 0.54761 | 26.6 | 1997 | 47673 |
| prs-fra | ntrex128 | 0.47819 | 19.9 | 1997 | 53481 |
| prs-por | ntrex128 | 0.46241 | 17.4 | 1997 | 51631 |
| prs-spa | ntrex128 | 0.48712 | 21.4 | 1997 | 54107 |
| pus-eng | ntrex128 | 0.43901 | 17.4 | 1997 | 47673 |
| pus-spa | ntrex128 | 0.40812 | 14.1 | 1997 | 54107 |
| tgk_Cyrl-eng | ntrex128 | 0.46839 | 18.6 | 1997 | 47673 |
| tgk_Cyrl-fra | ntrex128 | 0.42569 | 15.1 | 1997 | 53481 |
| tgk_Cyrl-por | ntrex128 | 0.41632 | 13.7 | 1997 | 51631 |
| tgk_Cyrl-spa | ntrex128 | 0.43763 | 16.8 | 1997 | 54107 |
| ckb-eng | tico19-test | 0.61905 | 40.1 | 2100 | 56315 |
| ckb-fra | tico19-test | 0.45070 | 19.7 | 2100 | 64661 |
| ckb-por | tico19-test | 0.49617 | 22.9 | 2100 | 62729 |
| ckb-spa | tico19-test | 0.50543 | 24.9 | 2100 | 66563 |
| fas-eng | tico19-test | 0.64016 | 37.3 | 2100 | 56315 |
| fas-fra | tico19-test | 0.53319 | 26.1 | 2100 | 64661 |
| fas-por | tico19-test | 0.58008 | 30.6 | 2100 | 62729 |
| fas-spa | tico19-test | 0.59239 | 33.3 | 2100 | 66563 |
| prs-eng | tico19-test | 0.61702 | 34.8 | 2100 | 56824 |
| prs-fra | tico19-test | 0.51218 | 24.0 | 2100 | 64661 |
| prs-por | tico19-test | 0.55888 | 28.6 | 2100 | 62729 |
| prs-spa | tico19-test | 0.57494 | 31.1 | 2100 | 66563 |
| pus-eng | tico19-test | 0.57586 | 32.1 | 2100 | 56315 |
| pus-fra | tico19-test | 0.46091 | 19.2 | 2100 | 64661 |
| pus-por | tico19-test | 0.51033 | 24.1 | 2100 | 62729 |
| pus-spa | tico19-test | 0.51857 | 25.9 | 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}