EU_Euskera_Translator / helsinki_models.py
AItool's picture
Upload 15 files
a235263 verified
helsinki_models = [
"Helsinki-NLP/opus-mt-tc-big-itc-eu",
"Helsinki-NLP/opus-mt-tc-big-eu-itc",
"Helsinki-NLP/opus-mt-euq-en",
"Helsinki-NLP/opus-mt-eu-ru",
"Helsinki-NLP/opus-mt-eu-es",
"Helsinki-NLP/opus-mt-eu-en",
"Helsinki-NLP/opus-mt-eu-de",
"Helsinki-NLP/opus-mt-en-euq",
"Helsinki-NLP/opus-mt-en-euq",
"Helsinki-NLP/opus-mt-en-eu",
"Helsinki-NLP/opus-mt-de-eu",
"Helsinki-NLP/opus-mt-ru-eu",
"Helsinki-NLP/opus-mt-es-eu",
]
def get_clearly_formatted_language_directions():
# Clearly formatted language directions only
# Helsinki-NLP/opus-mt-tc-base-bat-zle is ignored
# Helsinki-NLP/opus-mt-tc-fr-en is accepted due to clarity of source language being fr and target language being en
language_directions = [model.split("Helsinki-NLP/opus-mt-")[1] for model in helsinki_models
if (len(model.split("-"))<6 and
"opus-mt" in model and
len(model.split("_")) == 1)
and len(model) < len("Helsinki-NLP/opus-mt-src-trg")]
return language_directions