py-rouge
py-rouge copied to clipboard
line624 in rouge.py may be incorrect?
score = Rouge._compute_p_r_f_score(total_hypothesis_ngrams_count, total_reference_ngrams_count, total_ngrams_overlapping_count, self.alpha, self.weight_factor if use_w else 1.0)
may change to: score = Rouge._compute_p_r_f_score(hypothesis_count, reference_count, overlapping_ngrams, self.alpha, self.weight_factor if use_w else 1.0)
Since "total_hypothesis_ngrams_count, total_reference_ngrams_count, total_ngrams_overlapping_count" have not been defined yet in this if-else brunch.
I'm facing the same issue. Is this the right fix?
Thanks