Translates English into Lojban. Finetuned by
Linguardia from
Helsinki-NLP/opus-mt-en-mul on the
English↔Lojban sentence pairs in
Tatoeba.
Built to generate course material for a language that no major machine
translator supports.
1from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
2
3tok = AutoTokenizer.from_pretrained("linguardia/opus-mt-en-jbo")
4model = AutoModelForSeq2SeqLM.from_pretrained("linguardia/opus-mt-en-jbo")
5
6batch = tok([">>jbo<< I wake up early."], return_tensors="pt")
7out = model.generate(**batch, num_beams=4, max_length=64)
8print(tok.batch_decode(out, skip_special_tokens=True))
Against 39 human translations of sentences that appear verbatim in the target corpus:
Sentence pairs come from
Tatoeba, released under
CC-BY 2.0 FR, with some
sentences under CC0 1.0. Tatoeba's sentences are written by volunteers, and
this model is a derivative of their work: if you use it, credit Tatoeba and
its contributors.
Pairs were deduplicated on exact (English, Lojban) text. No machine
translation was used to create the training data at any point.