NLTK: corpus-level bleu vs sentence-level BLEU score
<p>I have imported nltk in python to calculate BLEU Score on Ubuntu. I understand how sentence-level BLEU score works, but I don't understand how corpus-level BLEU score work.</p>

<p>Below is my code for corpus-level BLEU score:</p>

<pre><code>import nltk

hypothesis = ['This', 'is', 'cat'] 
reference = ['This', 'is', 'a', 'cat']
BLEUscore = nltk.translate.bleu_score.corpus_bleu([reference], [hypothesis], weights = [1])
print(BLEUscore)
</code></pre>

<p>For some reason, the bleu score is 0 for the above code. I was expecting a corpus-level BLEU score of at least 0.5.</p>

<p>Here is my code for sentence-level BLEU score</p>

<pre><code>import nltk

hypothesis = ['This', 'is', 'cat'] 
reference = ['This', 'is', 'a', 'cat']
BLEUscore = nltk.translate.bleu_score.sentence_bleu([reference], hypothesis, weights = [1])
print(BLEUscore)
</code></pre>

<p>Here the sentence-level BLEU score is 0.71 which I expect, taking into account the brevity-penalty and the missing word "a". However, I don't understand how corpus-level BLEU score work.</p>

<p>Any help would be appreciated.</p>