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

make rouge support multi-ref #229

Merged
merged 5 commits into from
Aug 5, 2022
Merged

make rouge support multi-ref #229

merged 5 commits into from
Aug 5, 2022

Conversation

lvwerra
Copy link
Member

@lvwerra lvwerra commented Aug 4, 2022

This PR makes use of the score_multi method added in rouge_score==0.12.0 and allows to pass multiple references per prediction. This makes this metric now compatible with bleu and meteor.

Closes #118

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Aug 4, 2022

The documentation is not available anymore as the PR was closed or merged.

### Inputs
- **predictions** (`list`): list of predictions to score. Each prediction
should be a string with tokens separated by spaces.
- **references** (`list`): list of reference for each prediction. Each
- **references** (`list` or `list[list]`): list of reference for each prediction or a list of several predictions. Each
Copy link
Contributor

@mathemakitten mathemakitten Aug 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Should this be "a list of several references for this prediction" as opposed to "a list of several predictions"? I assume the change is meant to surface that each prediction can be correctly mapped to several references.

Otherwise I tested this and it LGTM :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely, thanks for noticing this!

@lvwerra lvwerra merged commit eaf34a7 into main Aug 5, 2022
@lvwerra lvwerra deleted the rouge-mutli-ref branch August 5, 2022 09:30
mathemakitten pushed a commit that referenced this pull request Aug 15, 2022
* make rouge support multi-ref

* update rouge dependency

* clean style

* fix rouge dependency

* fix readme
mathemakitten pushed a commit that referenced this pull request Sep 23, 2022
* make rouge support multi-ref

* update rouge dependency

* clean style

* fix rouge dependency

* fix readme
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

Successfully merging this pull request may close these issues.

Rouge and Meteor for multiple references
3 participants