Brevity penalty
= Brevity penalty
{title2=$\mathrm{BP}=\exp(\min\{0,1-r/c\})$}
The <brevity penalty> in <BLEU> reduces the score of a candidate translation corpus that is too short relative to its references. Matching a few reference phrases can give excellent <modified n-gram precision> while omitting much of the intended translation; the length factor addresses that particular failure.<BLEU: a Method for Automatic Evaluation of Machine Translation by Kishore Papineni and others>[§2.2.2, motivation and sentence brevity penalty]{ref}
For positive total candidate length $c$ and effective reference length $r$,
$$
\mathrm{BP}=
\begin{cases}
1&c>r,\\
e^{1-r/c}&c\leq r.
\end{cases}
$$
Equivalently, $\log\mathrm{BP}=\min\{0,1-r/c\}$. The effective reference length sums closest reference sentence lengths across the corpus; the penalty is then applied to the corpus totals.<BLEU: a Method for Automatic Evaluation of Machine Translation by Kishore Papineni and others>[§§2.2.2–2.3, effective reference length and BP formula]{ref}
For an own example, use reference `the cat is on the mat` and candidate `the cat is on`. Every candidate <n-gram> of lengths one through four matches the reference, so all four modified precisions are one. Nevertheless, $c=4$ and $r=6$ give
$$
\mathrm{BP}=e^{1-6/4}=e^{-1/2}\simeq0.6065.
$$
With the usual four equal weights, the full score in this example is also $0.6065$, because its precision <geometric mean> is one. Perfect candidate precision has not made an incomplete prefix a perfect translation.
At $c=r$, the factor is one. It remains one for longer candidates; their unmatched or repeated material can instead lower precision. A <brevity penalty> is therefore a length correction within a combined metric, not a complete measure of translation adequacy.
Report how reference lengths are selected and how empty outputs are handled before comparing implementations. The displayed division assumes $c>0$. Also distinguish corpus scoring from averaging sentence penalties, which need not produce the same result.