-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add translation pipeline model #110
Conversation
still TODO: add this new model to the documentation |
@niansong1996 should be ready for review now! |
README.md
Outdated
@@ -87,6 +87,7 @@ SummerTime supports different models (e.g., TextRank, BART, Longformer) as well | |||
| LongformerModel | :heavy_check_mark: | | | | | | |||
| MBartModel | :heavy_check_mark: | | | | 50 languages (Arabic, Czech, German, English, Spanish, Estonian, Finnish, French, Gujarati, Hindi, Italian, Japanese, Kazakh, Korean, Lithuanian, Latvian, Burmese, Nepali, Dutch, Romanian, Russian, Sinhala, Turkish, Vietnamese, Chinese, Afrikaans, Azerbaijani, Bengali, Persian, Hebrew, Croatian, Indonesian, Georgian, Khmer, Macedonian, Malayalam, Mongolian, Marathi, Polish, Pashto, Portuguese, Swedish, Tamil, Telugu, Thai, Tagalog, Ukrainian, Urdu, Xhosa, Slovenian) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the languages, maybe compile a list and only put a link here to that list?
) | ||
# TODO: translate each doc separately if provided multiple docs in corpus? | ||
if queries: | ||
queries = self.translator.translate(queries, target_lang="en", beam_size=4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when you specify the beam_size as 4, is the output one sentence or 4?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still just one sentence -- this is just the beam size for the translation model's generation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Left a few comments and should be ready to merge after you respond to them!
All set with the changes! (assuming you were referring to the mBART-50 listed languages in the README) |
LGTM, merging now |
add a translation pipeline model class (other lang -> translate to english -> summarization in english -> translate summaries to english)
Addressing #109