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 TER #646

Merged
merged 19 commits into from
Dec 6, 2021
Merged

Add TER #646

merged 19 commits into from
Dec 6, 2021

Conversation

stancld
Copy link
Contributor

@stancld stancld commented Nov 30, 2021

What does this PR do?

This PR adds a new text evaluation metric - TER.

Fixes #636

I write _LevenshteinEditDistance in helper.py as I think it can be also utilised for EED.

Current state: I need to go through the PR tomorrow once again and then it should be ready for review.

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 30, 2021

Codecov Report

Merging #646 (c26e243) into master (965a6cf) will increase coverage by 22%.
The diff coverage is 94%.

@@           Coverage Diff           @@
##           master   #646     +/-   ##
=======================================
+ Coverage      72%    95%    +22%     
=======================================
  Files         164    166      +2     
  Lines        6002   6369    +367     
=======================================
+ Hits         4350   6045   +1695     
+ Misses       1652    324   -1328     

@SkafteNicki SkafteNicki added this to the v0.7 milestone Nov 30, 2021
tests/text/test_ter.py Show resolved Hide resolved
tests/text/test_ter.py Outdated Show resolved Hide resolved
tests/text/test_ter.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/helper.py Show resolved Hide resolved
torchmetrics/functional/text/ter.py Show resolved Hide resolved
torchmetrics/functional/text/ter.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/ter.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/ter.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/ter.py Outdated Show resolved Hide resolved
tests/text/test_ter.py Outdated Show resolved Hide resolved
torchmetrics/functional/text/ter.py Show resolved Hide resolved
@mergify mergify bot added the ready label Dec 6, 2021
@SkafteNicki SkafteNicki merged commit 54ab1a1 into Lightning-AI:master Dec 6, 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 TER
3 participants