Skip to content

Commit

Permalink
Merge pull request #9 from nicolas-lair/patch-1
Browse files Browse the repository at this point in the history
Allow verbose off for Bleu score
  • Loading branch information
salaniz authored Nov 18, 2020
2 parents 38c2534 + 6862087 commit 14f4a1a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bleu/bleu.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(self, n=4):
self._hypo_for_image = {}
self.ref_for_image = {}

def compute_score(self, gts, res):
def compute_score(self, gts, res, verbose=1):

assert(gts.keys() == res.keys())
imgIds = gts.keys()
Expand All @@ -37,7 +37,7 @@ def compute_score(self, gts, res):
bleu_scorer += (hypo[0], ref)

#score, scores = bleu_scorer.compute_score(option='shortest')
score, scores = bleu_scorer.compute_score(option='closest', verbose=1)
score, scores = bleu_scorer.compute_score(option='closest', verbose=verbose)
#score, scores = bleu_scorer.compute_score(option='average', verbose=1)

# return (bleu, bleu_info)
Expand Down

0 comments on commit 14f4a1a

Please sign in to comment.