Views
No views yet
>>id<< (id = valid target language ID), e.g. >>dan<<1from transformers import MarianMTModel, MarianTokenizer
2
3src_text = [
4 ">>dan<< Replace this with text in an accepted source language.",
5 ">>swe<< This is the second sentence."
6]
7
8model_name = "pytorch-models/opus-mt-tc-bible-big-deu_eng_fra_por_spa-gmq"
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-gmq")
3print(pipe(">>dan<< Replace this with text in an accepted source language."))| langpair | testset | chr-F | BLEU | #sent | #words |
|---|---|---|---|---|---|
| deu-dan | tatoeba-test-v2021-08-07 | 0.74051 | 57.8 | 9998 | 74644 |
| deu-isl | tatoeba-test-v2021-08-07 | 0.61256 | 31.7 | 969 | 5951 |
| deu-nob | tatoeba-test-v2021-08-07 | 0.71413 | 52.9 | 3525 | 31978 |
| deu-nor | tatoeba-test-v2021-08-07 | 0.71253 | 52.7 | 3651 | 32928 |
| deu-swe | tatoeba-test-v2021-08-07 | 0.72650 | 58.2 | 3410 | 22701 |
| eng-dan | tatoeba-test-v2021-08-07 | 0.74708 | 60.6 | 10795 | 79385 |
| eng-fao | tatoeba-test-v2021-08-07 | 0.48304 | 29.0 | 294 | 1933 |
| eng-isl | tatoeba-test-v2021-08-07 | 0.58312 | 33.2 | 2503 | 19023 |
| eng-nno | tatoeba-test-v2021-08-07 | 0.62606 | 42.7 | 460 | 3428 |
| eng-nob | tatoeba-test-v2021-08-07 | 0.72340 | 57.4 | 4539 | 36119 |
| eng-nor | tatoeba-test-v2021-08-07 | 0.71514 | 56.2 | 5000 | 39552 |
| eng-swe | tatoeba-test-v2021-08-07 | 0.73720 | 60.5 | 10362 | 68067 |
| fra-dan | tatoeba-test-v2021-08-07 | 0.78018 | 64.1 | 1731 | 11312 |
| fra-nob | tatoeba-test-v2021-08-07 | 0.74252 | 59.1 | 323 | 2175 |
| fra-nor | tatoeba-test-v2021-08-07 | 0.74407 | 60.3 | 477 | 3097 |
| fra-swe | tatoeba-test-v2021-08-07 | 0.75644 | 62.1 | 1407 | 9170 |
| por-dan | tatoeba-test-v2021-08-07 | 0.79528 | 65.6 | 873 | 5258 |
| por-nor | tatoeba-test-v2021-08-07 | 0.73559 | 58.0 | 481 | 4030 |
| por-swe | tatoeba-test-v2021-08-07 | 0.75566 | 60.2 | 320 | 1938 |
| spa-dan | tatoeba-test-v2021-08-07 | 0.73310 | 57.7 | 5000 | 35937 |
| spa-isl | tatoeba-test-v2021-08-07 | 0.52169 | 18.7 | 238 | 1220 |
| spa-nob | tatoeba-test-v2021-08-07 | 0.76501 | 60.9 | 885 | 6762 |
| spa-nor | tatoeba-test-v2021-08-07 | 0.75815 | 60.1 | 960 | 7217 |
| spa-swe | tatoeba-test-v2021-08-07 | 0.74222 | 60.7 | 1351 | 8357 |
| deu-dan | flores101-devtest | 0.62006 | 34.8 | 1012 | 24638 |
| deu-isl | flores101-devtest | 0.48236 | 18.8 | 1012 | 22834 |
| deu-swe | flores101-devtest | 0.61778 | 33.7 | 1012 | 23121 |
| eng-swe | flores101-devtest | 0.69435 | 45.5 | 1012 | 23121 |
| fra-dan | flores101-devtest | 0.61019 | 34.0 | 1012 | 24638 |
| fra-isl | flores101-devtest | 0.47647 | 18.1 | 1012 | 22834 |
| fra-swe | flores101-devtest | 0.60354 | 32.2 | 1012 | 23121 |
| por-isl | flores101-devtest | 0.47937 | 19.1 | 1012 | 22834 |
| por-swe | flores101-devtest | 0.60857 | 33.1 | 1012 | 23121 |
| spa-dan | flores101-devtest | 0.54890 | 24.4 | 1012 | 24638 |
| spa-nob | flores101-devtest | 0.50610 | 18.3 | 1012 | 23873 |
| spa-swe | flores101-devtest | 0.54011 | 22.4 | 1012 | 23121 |
| deu-dan | flores200-devtest | 0.62152 | 35.1 | 1012 | 24638 |
| deu-isl | flores200-devtest | 0.48648 | 19.1 | 1012 | 22834 |
| deu-nno | flores200-devtest | 0.53530 | 24.0 | 1012 | 24316 |
| deu-nob | flores200-devtest | 0.55748 | 25.1 | 1012 | 23873 |
| deu-swe | flores200-devtest | 0.62138 | 34.2 | 1012 | 23121 |
| eng-dan | flores200-devtest | 0.70321 | 47.0 | 1012 | 24638 |
| eng-isl | flores200-devtest | 0.52585 | 24.4 | 1012 | 22834 |
| eng-nno | flores200-devtest | 0.61372 | 33.8 | 1012 | 24316 |
| eng-nob | flores200-devtest | 0.62508 | 34.4 | 1012 | 23873 |
| eng-swe | flores200-devtest | 0.69703 | 46.0 | 1012 | 23121 |
| fra-dan | flores200-devtest | 0.61025 | 34.1 | 1012 | 24638 |
| fra-isl | flores200-devtest | 0.48273 | 18.8 | 1012 | 22834 |
| fra-nno | flores200-devtest | 0.53032 | 24.3 | 1012 | 24316 |
| fra-nob | flores200-devtest | 0.54933 | 25.0 | 1012 | 23873 |
| fra-swe | flores200-devtest | 0.60612 | 32.8 | 1012 | 23121 |
| por-dan | flores200-devtest | 0.62221 | 36.2 | 1012 | 24638 |
| por-isl | flores200-devtest | 0.48357 | 19.6 | 1012 | 22834 |
| por-nno | flores200-devtest | 0.54369 | 26.3 | 1012 | 24316 |
| por-nob | flores200-devtest | 0.56054 | 26.4 | 1012 | 23873 |
| por-swe | flores200-devtest | 0.61388 | 34.1 | 1012 | 23121 |
| spa-dan | flores200-devtest | 0.55091 | 24.7 | 1012 | 24638 |
| spa-isl | flores200-devtest | 0.44469 | 14.2 | 1012 | 22834 |
| spa-nno | flores200-devtest | 0.48898 | 18.6 | 1012 | 24316 |
| spa-nob | flores200-devtest | 0.50901 | 18.8 | 1012 | 23873 |
| spa-swe | flores200-devtest | 0.54182 | 22.7 | 1012 | 23121 |
| eng-isl | newstest2021 | 0.51196 | 21.9 | 1000 | 25233 |
| deu-dan | ntrex128 | 0.56412 | 29.1 | 1997 | 47643 |
| deu-isl | ntrex128 | 0.48309 | 18.8 | 1997 | 46643 |
| deu-nno | ntrex128 | 0.51535 | 22.0 | 1997 | 46512 |
| deu-nob | ntrex128 | 0.56152 | 27.6 | 1997 | 45501 |
| deu-swe | ntrex128 | 0.58061 | 29.6 | 1997 | 44889 |
| eng-dan | ntrex128 | 0.61894 | 37.6 | 1997 | 47643 |
| eng-isl | ntrex128 | 0.52027 | 23.9 | 1997 | 46643 |
| eng-nno | ntrex128 | 0.60754 | 34.0 | 1997 | 46512 |
| eng-nob | ntrex128 | 0.62327 | 36.9 | 1997 | 45501 |
| eng-swe | ntrex128 | 0.66129 | 41.3 | 1997 | 44889 |
| fra-dan | ntrex128 | 0.54102 | 27.1 | 1997 | 47643 |
| fra-isl | ntrex128 | 0.47296 | 18.4 | 1997 | 46643 |
| fra-nno | ntrex128 | 0.50532 | 21.6 | 1997 | 46512 |
| fra-nob | ntrex128 | 0.54026 | 25.7 | 1997 | 45501 |
| fra-swe | ntrex128 | 0.56278 | 27.9 | 1997 | 44889 |
| por-dan | ntrex128 | 0.56288 | 30.0 | 1997 | 47643 |
| por-isl | ntrex128 | 0.47577 | 17.8 | 1997 | 46643 |
| por-nno | ntrex128 | 0.52158 | 23.0 | 1997 | 46512 |
| por-nob | ntrex128 | 0.55788 | 27.4 | 1997 | 45501 |
| por-swe | ntrex128 | 0.57790 | 29.3 | 1997 | 44889 |
| spa-dan | ntrex128 | 0.55607 | 27.5 | 1997 | 47643 |
| spa-isl | ntrex128 | 0.48566 | 18.4 | 1997 | 46643 |
| spa-nno | ntrex128 | 0.51741 | 22.2 | 1997 | 46512 |
| spa-nob | ntrex128 | 0.55824 | 26.8 | 1997 | 45501 |
| spa-swe | ntrex128 | 0.57851 | 28.8 | 1997 | 44889 |
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}