Skip to content
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

Translation API should allow for multiple source/target languages #394

Open
mrjackbo opened this issue Jun 13, 2023 · 1 comment
Open

Translation API should allow for multiple source/target languages #394

mrjackbo opened this issue Jun 13, 2023 · 1 comment

Comments

@mrjackbo
Copy link

Hi, thanks so much for the great project!

At the moment TranslationModel::translate takes a slice of texts to translate, a source language and a destination language and produces a slice of translated texts.

For models like m2m or nnlb, it would be convenient if there were an additional method, perhaps translate_multi_lang, that takes a slice of texts to translate, a slice of source languages and possibly a slice of destination languages. This way one could make use of the batched inference but for multiple source/destination pairs.

At least for multiple source languages, this would be very easy to implement.

@guillaume-be
Copy link
Owner

Hello @mrjackbo ,

Apologies for getting back to you with a delay. This may indeed be useful - would you like to draft a pull request? If not I will try to have a look at it this week-end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants