Views
No views yet
Helsinki-NLP/opus-mt-synthetic-en-mk| Language Pair | ChrF Score | COMET Score |
|---|---|---|
| English ↔ Basque | 53.00 | 81.51 |
| English ↔ Scottish Gaelic | 51.10 | 78.04 |
| English ↔ Icelandic | 49.91 | 80.16 |
| English ↔ Georgian | 49.49 | 80.72 |
| English ↔ Macedonian | 57.72 | 82.24 |
| English ↔ Somali | 45.10 | 78.15 |
| English ↔ Ukrainian | 51.71 | 78.89 |
1from transformers import MarianMTModel, MarianTokenizer
2
3# Load the pre-trained model and tokenizer
4model_name = "Helsinki-NLP/opus-mt-synthetic-en-mk"
5model = MarianMTModel.from_pretrained(model_name)
6tokenizer = MarianTokenizer.from_pretrained(model_name)
7
8# Example source text (English)
9source_texts = ["Hello, how are you?", "Good morning!", "What is your name?"]
10
11# Tokenize the input texts
12inputs = tokenizer(source_texts, return_tensors="pt", padding=True, truncation=True)
13
14# Generate translations
15translated_ids = model.generate(inputs["input_ids"])
16
17# Decode the generated tokens to get the translated text
18translated_texts = tokenizer.batch_decode(translated_ids, skip_special_tokens=True)
19
20# Print the translations
21for src, tgt in zip(source_texts, translated_texts):
22 print(f"Source: {src} => Translated: {tgt}")Source: How are you? => Translated: როგორ ხართ?
Source: Good morning! => Translated: დილა მშვიდობისა
Source: What is your name? => Translated: რა არის თქვენი სახელი?1@article{degibert2025scaling,
2 title={Scaling Low-Resource MT via Synthetic Data Generation with LLMs},
3 author={de Gibert, Ona and Attieh, Joseph and Vahtola, Teemu and Aulamo, Mikko and Li, Zihao and V{\'a}zquez, Ra{\'u}l and Hu, Tiancheng and Tiedemann, J{\"o}rg},
4 journal={arXiv preprint arXiv:2505.14423},
5 year={2025}
6}