Adds translation pipeline#3419
Merged
thomwolf merged 30 commits intohuggingface:masterfrom Mar 26, 2020
Merged
Conversation
b890e50 to
132f16f
Compare
thomwolf
reviewed
Mar 25, 2020
3 tasks
4ee18ef to
5fe5401
Compare
2a256ca to
c0c840c
Compare
thomwolf
approved these changes
Mar 26, 2020
| Translates from one language to another. | ||
|
|
||
| Usage:: | ||
| en_fr_translator = pipeline("translation", from_lng="English", to_lng="French") |
Member
There was a problem hiding this comment.
Can yo update this doc string?
Codecov Report
@@ Coverage Diff @@
## master #3419 +/- ##
==========================================
+ Coverage 77.76% 77.80% +0.03%
==========================================
Files 100 100
Lines 16995 17025 +30
==========================================
+ Hits 13216 13246 +30
Misses 3779 3779
Continue to review full report at Codecov.
|
LysandreJik
approved these changes
Mar 26, 2020
| ): | ||
| r""" | ||
| Args: | ||
| *texts: (list of strings) articles to be summarized |
Member
There was a problem hiding this comment.
texts to be translated instead of summarized?
Contributor
Author
There was a problem hiding this comment.
good catch!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The API for translation is as follows:
for English to French translation.
PR adds tests and gives an example in the docstring.
PR builds on #3413 and should be merged after this one.
Example:
