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

Add ChrF++ #641

Merged
merged 9 commits into from
Nov 29, 2021
Merged

Add ChrF++ #641

merged 9 commits into from
Nov 29, 2021

Conversation

stancld
Copy link
Contributor

@stancld stancld commented Nov 25, 2021

What does this PR do?

This PR adds a new text evaluation metric - ChrF++.

Fixes #634

REF: https://github.com/m-popovic/chrF/blob/master/chrF%2B%2B.py

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 🙃

@codecov
Copy link

codecov bot commented Nov 25, 2021

Codecov Report

Merging #641 (728b8e3) into master (1fef5ae) will decrease coverage by 0%.
The diff coverage is 93%.

@@          Coverage Diff           @@
##           master   #641    +/-   ##
======================================
- Coverage      95%    95%    -0%     
======================================
  Files         159    161     +2     
  Lines        5584   5781   +197     
======================================
+ Hits         5315   5499   +184     
- Misses        269    282    +13     

Copy link
Member

@justusschock justusschock left a comment

Choose a reason for hiding this comment

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

I cannot comment much on the implementation since I am not that much into NLP, but since you test that against another lib I assume it to be fine :)

Just a very minor question

@mergify mergify bot added the ready label Nov 26, 2021
Copy link
Member

@justusschock justusschock left a comment

Choose a reason for hiding this comment

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

The missing question :D

torchmetrics/functional/text/chrf.py Outdated Show resolved Hide resolved
docs/source/references/functional.rst Outdated Show resolved Hide resolved
docs/source/references/modules.rst Outdated Show resolved Hide resolved
torchmetrics/text/chrf.py Show resolved Hide resolved
torchmetrics/text/chrf.py Show resolved Hide resolved
torchmetrics/text/chrf.py Show resolved Hide resolved
torchmetrics/text/chrf.py Show resolved Hide resolved
@stancld stancld mentioned this pull request Nov 29, 2021
Copy link
Member

@SkafteNicki SkafteNicki left a comment

Choose a reason for hiding this comment

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

only some typing issues remain :]
(please see the failing test for more info)

torchmetrics/functional/text/chrf.py Outdated Show resolved Hide resolved
torchmetrics/text/chrf.py Outdated Show resolved Hide resolved
@justusschock justusschock enabled auto-merge (squash) November 29, 2021 11:29
@justusschock justusschock merged commit f50bbd6 into Lightning-AI:master Nov 29, 2021
@Borda Borda added this to the v0.7 milestone Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ChrF++
4 participants