Skip to content

Commit

Permalink
fix: per_item_dialog_bleu metric usage (#1130)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugen2525 committed Feb 25, 2020
1 parent 69d5ee4 commit 3cb56cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deeppavlov/metrics/bleu.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ def per_item_bleu(y_true, y_predicted):
def per_item_dialog_bleu(y_true, y_predicted):
y_true = (y['text'] for dialog in y_true for y in dialog)
return corpus_bleu([[y_t.lower().split()] for y_t in y_true],
[y_p.lower().split() for y_p in y_predicted])
[y.lower().split() for y_p in y_predicted for y in y_p])

0 comments on commit 3cb56cd

Please sign in to comment.