28 for (
unsigned int n = 0; n < order; ++n) {
29 logBleu += log ( (
double) this->
hits[n] / (
double) this->
tots[n]);
32 logBrev = min (0.0, 1 - this->
refLength / (
double) (this->
tots[0]) );
33 return Error (exp (logBleu + logBrev), exp (logBrev) );
68 o << b.m_bleu <<
" " << b.m_brev;
73 return b1.m_bleu > b2.m_bleu;
BleuStats operator+(const BleuStats &bs1, const BleuStats &bs2)
static const unsigned int MAX_BLEU_ORDER
BleuStats operator-(const BleuStats &bs1, const BleuStats &bs2)
Error ComputeError(const unsigned int=4) const
bool operator>(Bleu &b1, Bleu &b2)
ostream & operator<<(ostream &o, const BleuStats &b)