Skip to content

Commit

Permalink
Merge pull request #4 from hamelsmu/hamelsmu-patch-1
Browse files Browse the repository at this point in the history
Update seq2seq_utils.py
  • Loading branch information
Hamel Husain authored Mar 18, 2018
2 parents 2ebfb1c + b34bc64 commit 3bc26a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions notebooks/seq2seq_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def evaluate_model(self, holdout_bodies, holdout_titles):
logging.warning('Calculating BLEU.')

#must be careful with nltk api for corpus_bleu!,
# expects List[List[List[str]]] for ground truth, if you forget you will get
# errenous results!
# expects List[List[List[str]]] for ground truth, using List[List[str]] will give you
# erroneous results.
bleu = corpus_bleu([[a] for a in actual], predicted)
return bleu

0 comments on commit 3bc26a1

Please sign in to comment.