Views
No views yet

| EN-LT | BLEU |
|---|---|
| scoris/scoris-mt-en-lt | 41.9 |
| Helsinki-NLP/opus-mt-tc-big-en-lt | 34.3 |
| Google Translate | 30.8 |
| Deepl | 32.3 |
| BLEU Score | Interpretation |
|---|---|
| < 10 | Almost useless |
| 10 - 19 | Hard to get the gist |
| 20 - 29 | The gist is clear, but has significant grammatical errors |
| 30 - 40 | Understandable to good translations |
| 40 - 50 | High quality translations |
| 50 - 60 | Very high quality, adequate, and fluent translations |
| > 60 | Quality often better than human |
1from transformers import MarianMTModel, MarianTokenizer
2
3# Specify the model identifier on Hugging Face Model Hub
4model_name = "scoris/scoris-mt-en-lt"
5
6# Load the model and tokenizer from Hugging Face
7tokenizer = MarianTokenizer.from_pretrained(model_name)
8model = MarianMTModel.from_pretrained(model_name)
9
10src_text = [
11 "Once upon a time there were three bears, who lived together in a house of their own in a wood.",
12 "One of them was a little, small wee bear; one was a middle-sized bear, and the other was a great, huge bear.",
13 "One day, after they had made porridge for their breakfast, they walked out into the wood while the porridge was cooling.",
14 "And while they were walking, a little girl came into the house. "
15]
16
17# Tokenize the text and generate translations
18translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
19
20# Print out the translations
21for t in translated:
22 print(tokenizer.decode(t, skip_special_tokens=True))
23
24# Result:
25# Kažkada buvo trys lokiai, kurie gyveno kartu savame name miške.
26# Vienas iš jų buvo mažas, mažas lokys; vienas buvo vidutinio dydžio lokys, o kitas buvo didelis, didžiulis lokys.
27# Vieną dieną, pagaminę košės pusryčiams, jie išėjo į mišką, kol košė vėso.
28# Jiems einant, į namus atėjo maža mergaitė.