1.5.7 test failure in nbest-optimize-bleu
Andreas Stolcke
stolcke at speech.sri.com
Sat Nov 8 07:05:44 PST 2008
In message <49087CA2.3030504 at jhu.edu>you wrote:
> Hi,
> I didn't see anything about this in the mailing-list archive. I just
> installed 1.5.7 and ran the
> tests. I saw one failure, in nbest-optimize-bleu. I looked at the
> code briefly; the output is coming from nbest-optimize.cc:1179, but
> that's about as far as I got. I built on Mac OS 10.4.11 using
> this compiler version:
>
> ~/work/srilm--$ c++ --version
> i686-apple-darwin8-g++-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5370)
>
> I can try another system if that will help, or let me know if anyone
> wants more information.
> Thanks,
> Ken Basye
>
It turns out this problems seems to affect compilation with gcc 4.2 on all
the platforms I tried (Linux, Solaris), so I assume it's the same bug as
you describe. The problem has to do with expression evaluation order
when the expression has side effects (++ operator).
You can apply the following patch, or download the beta release
(which also has some other fixes for BLEU optimization).
Andreas
*** lm/src/nbest-optimize.cc 2008/11/07 15:14:15 1.58
--- lm/src/nbest-optimize.cc 2008/11/08 13:49:49 1.59
***************
*** 1176,1182 ****
{
if (!fixLambdas[k])
cerr << "lambda_" << j - 1
! << " " << p[ilo][j++] << endl;
}
}
}
--- 1176,1183 ----
{
if (!fixLambdas[k])
cerr << "lambda_" << j - 1
! << " " << p[ilo][j] << endl;
! j ++;
}
}
}
More information about the SRILM-User
mailing list