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

in_target_language can return ratios above 1.0 (again) #149

Closed
osma opened this issue Sep 16, 2024 · 1 comment · Fixed by #150
Closed

in_target_language can return ratios above 1.0 (again) #149

osma opened this issue Sep 16, 2024 · 1 comment · Fixed by #150
Labels
bug Something isn't working

Comments

@osma
Copy link
Contributor

osma commented Sep 16, 2024

Bug #112 seems to have resurfaced. Again, in_target_language('It was a true gift', lang=('en','de')) returns 1.6666... in simplemma 1.1.1.

Looking at the code for proportion_in_target_languages, it was changed back to the buggy algorithm that uses sum() in #116 (by @juanjoDiaz) and the unit test guarding against this bug was simply removed in the same PR :(

@adbar
Copy link
Owner

adbar commented Oct 1, 2024

@osma Thank you for reporting the issue, this one slipped through.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants