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

ChrF fails on division by zero #782

Open
kasnerz opened this issue Dec 27, 2018 · 0 comments
Open

ChrF fails on division by zero #782

kasnerz opened this issue Dec 27, 2018 · 0 comments
Labels

Comments

@kasnerz
Copy link
Collaborator

kasnerz commented Dec 27, 2018

In case len(tokens) == 0 (i.e. the input sentence is empty) ChrF crashes with ZeroDivisionError on line 89:

https://github.com/ufal/neuralmonkey/blob/master/neuralmonkey/evaluators/chrf.py#L89

  File "/lnet/spec/work/people/kasner/neuralmonkey-ctc-decoder/neuralmonkey/bin/neuralmonkey/evaluators/chrf.py", line 89, in chr_p
    return precision / float(self.max_ord)
ZeroDivisionError: float division by zero
@kasnerz kasnerz added the bug label Dec 27, 2018
varisd added a commit that referenced this issue Jan 2, 2019
@varisd varisd mentioned this issue Jan 2, 2019
jindrahelcl added a commit that referenced this issue Jan 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant