Diego999 / py-rouge

Full Python implementation of the ROUGE metric, producing same results as in the official perl implementation.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

line624 in rouge.py may be incorrect?

JialeGuo opened this issue · 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.

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

Thanks