-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable manually specifying the desired OPUS model? #74
Comments
For some specific sentences it also seems that |
You can bypass easynmt entirely and do it for example with transformers ( from transformers import pipeline
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-en-pt")
print(pipe("Nobody Expects the Spanish Inquisition")[0]["translation_text"]) but in this case you'll need to manually deal with sentence tokenization so it's not as easy as easynmt. Or you can use |
I'm seeing this same problem:
bit of a blocker for me as I'm trying to translate multiple different languages and it would be nice if easynmt just handled them all correctly - does anyone know how to go about fixing this? |
Adding |
I really like the library, great work!
Is there a way to manually specify a specific OPUS model? For example EasyNMT with OPUS currently does not support English as source and Portuguese as target language because it tries to download 'opus-mt-en-pt' by default, which does not exist.
There is, however, an en2pt model on the hub now (https://huggingface.co/Helsinki-NLP/opus-mt-tc-big-en-pt) with a slightly different name. I don't know how to tell EasyNMT to take this specific model instead of throwing the following error:
OSError: Helsinki-NLP/opus-mt-en-pt is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
The text was updated successfully, but these errors were encountered: