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

Bug if first sentence scores 0 #3

Open
kirefu opened this issue Jul 15, 2022 · 0 comments
Open

Bug if first sentence scores 0 #3

kirefu opened this issue Jul 15, 2022 · 0 comments

Comments

@kirefu
Copy link

kirefu commented Jul 15, 2022

Hi there,

This error is produced:
totalMatchingCount[order] += bestMatchingCount[order]
UnboundLocalError: local variable 'bestMatchingCount' referenced before assignment

chrF/chrF++.py

Line 157 in 6d3c384

bestMatchingCount = matchingNgramCounts

when the first sentence scores 0. Therefore I believe the fix is that all these variables inside the if statement should be initialised to defaultdict(float) in case of this.

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

No branches or pull requests

1 participant