Skip to content

make rouge support multi-ref#229

Merged
lvwerra merged 5 commits into
mainfrom
rouge-mutli-ref
Aug 5, 2022
Merged

make rouge support multi-ref#229
lvwerra merged 5 commits into
mainfrom
rouge-mutli-ref

Conversation

@lvwerra

@lvwerra lvwerra commented Aug 4, 2022

Copy link
Copy Markdown
Member

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

HuggingFaceDocBuilderDev commented Aug 4, 2022

Copy link
Copy Markdown

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

Comment thread metrics/rouge/README.md Outdated
- **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

@mathemakitten mathemakitten Aug 4, 2022

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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