Views
No views yet

| LT-EN | BLEU |
|---|---|
| scoris/scoris-mt-lt-en | 43.8 |
| Helsinki-NLP/opus-mt-tc-big-en-lt | 36.8 |
| Google Translate | 31.9 |
| Deepl | 36.1 |
| 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/scoris-mt-lt-en"
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 "Kartą, senų senovėje, buvo viena mergaitė ir gyveno ji su savo mama mažoje jaukioje trobelėje prie miško. ",
12 "Mergaitę žmonės vadino Raudonkepuraite, nes ji dažnai dėvėdavo raudoną apsiaustėlį su kapišonu. ",
13 "Mergaitė mielai gobdavosi šiuo apsiaustėliu, nes jį buvo gavusi iš savo močiutės, kuri gyveno namelyje už miško ir labai mylėjo Raudonkepuraitę. ",
14 "Vieną dieną mama priruošė Raudonkepuraitei pilną krepšelį įvairiausių gėrybių.",
15 "Pridėjo obuoliukų, kriaušaičių, braškių, taip pat skanių pyragėlių, kuriuos pati buvo iškepusi, sūrio ir gabalėlį mėsos bei didelį išdabintą tortą."
16]
17
18# Tokenize the text and generate translations
19translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
20
21# Print out the translations
22for t in translated:
23 print(tokenizer.decode(t, skip_special_tokens=True))
24
25#Once upon a time there was a girl, and she lived with her mother in a small cozy hut by the forest.
26#The girl was called the Red cape because she often wore a red cape.
27#The girl would gladly wear this coat, because she had it from her grandmother, who lived in a house outside the forest and loved Redcape very much.
28#One day my mother prepared a basket full of all kinds of good things for the Red cape.
29#He added apples, pears, strawberries, as well as delicious cakes that he had baked, cheese and a piece of meat, and a large cake.