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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

bleuscore: Add weights argument to allow non-uniform n-gram weights #1075

Merged
merged 3 commits into from Jun 7, 2022

Conversation

stancld
Copy link
Contributor

@stancld stancld commented Jun 7, 2022

What does this PR do?

This PR adds an argument for BLEUScore and SacreBLEUScore metrics allowing to define own n-gram weights for the score calculation, and thus enables to use different than uniform weights.

Fixes #1074

Before submitting

  • Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 馃檭

@Borda Borda added this to the v0.9 milestone Jun 7, 2022
@Borda Borda added bug / fix Something isn't working API / design labels Jun 7, 2022
@codecov
Copy link

codecov bot commented Jun 7, 2022

Codecov Report

Merging #1075 (8d8fb19) into master (c04090b) will decrease coverage by 0%.
The diff coverage is 84%.

@@          Coverage Diff           @@
##           master   #1075   +/-   ##
======================================
- Coverage      95%     94%   -0%     
======================================
  Files         181     181           
  Lines        8029    8040   +11     
======================================
- Hits         7601    7597    -4     
- Misses        428     443   +15     

@mergify mergify bot added the ready label Jun 7, 2022
@Borda Borda merged commit f0279bb into master Jun 7, 2022
@Borda Borda deleted the feature/bleuscore-weights branch June 7, 2022 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API / design bug / fix Something isn't working ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bleuscore from torchmetric give different results compare to NLTK
3 participants