Open kasnerz opened 5 years ago
In case len(tokens) == 0 (i.e. the input sentence is empty) ChrF crashes with ZeroDivisionError on line 89:
len(tokens) == 0
ZeroDivisionError
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
In case
len(tokens) == 0
(i.e. the input sentence is empty) ChrF crashes withZeroDivisionError
on line 89:https://github.com/ufal/neuralmonkey/blob/master/neuralmonkey/evaluators/chrf.py#L89