fix: create BLEUScore for each n-gram
Browse files- 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
|
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,
|
|
|
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,
|