diff --git a/src/mlpack/core/metrics/bleu_impl.hpp b/src/mlpack/core/metrics/bleu_impl.hpp index 27119bef1e..f81d62c69a 100644 --- a/src/mlpack/core/metrics/bleu_impl.hpp +++ b/src/mlpack/core/metrics/bleu_impl.hpp @@ -180,7 +180,7 @@ ElemType BLEU::Evaluate( ratio = ElemType(translationLength); if (referenceLength > 0) - ration /= referenceLength; + ratio /= referenceLength; brevityPenalty = (ratio > 1.0) ? 1.0 : std::exp(1.0 - 1.0 / ratio); bleuScore = geometricMean * brevityPenalty;