py-rouge icon indicating copy to clipboard operation
py-rouge copied to clipboard

line624 in rouge.py may be incorrect?

Open JialeGuo opened this issue 5 years ago • 1 comments

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.

JialeGuo avatar Nov 20 '19 11:11 JialeGuo

I'm facing the same issue. Is this the right fix?

Thanks

manikbhandari avatar Mar 13 '20 02:03 manikbhandari