fnvls commited on
Commit
8b46707
1 Parent(s): 1831563

fix: create BLEUScore for each n-gram

Browse files
Files changed (1) hide show
  1. bleu_1234.py +4 -4
bleu_1234.py CHANGED
@@ -108,10 +108,10 @@ class bleu_1234(evaluate.Metric):
108
  bleu_score_3 = BLEUScore(n_gram=3)
109
  bleu_score_4 = BLEUScore(n_gram=4)
110
 
111
- bleu1 = bleu_score_1(predictions, references, n_gram=1)
112
- bleu2 = bleu_score_2(predictions, references, n_gram=2)
113
- bleu3 = bleu_score_3(predictions, references, n_gram=3)
114
- bleu4 = bleu_score_4(predictions, references, n_gram=4)
115
 
116
  output_dict = {
117
  "bleu-1": bleu1,
 
108
  bleu_score_3 = BLEUScore(n_gram=3)
109
  bleu_score_4 = BLEUScore(n_gram=4)
110
 
111
+ bleu1 = bleu_score_1(predictions, references)
112
+ bleu2 = bleu_score_2(predictions, references)
113
+ bleu3 = bleu_score_3(predictions, references)
114
+ bleu4 = bleu_score_4(predictions, references)
115
 
116
  output_dict = {
117
  "bleu-1": bleu1,