[SRILM User List] lattice-tool error while loading mesh
Andreas Stolcke
stolcke at icsi.berkeley.edu
Wed Jul 11 19:03:13 PDT 2012
On 7/11/2012 6:04 PM, Long Qin wrote:
> Hi Andreas,
>
> Thanks for answering my question.
>
> Yes, I did use the nbest-lattice -use-mesh -nbest-backtrace. The
> attachment files are the nbest file and the mesh file. Is there
> anything wrong with it?
Your nbest file is fine, but there was a bug in the nbest list parser
that would lead to incorrect mesh files when no pronunciation
information was given (as in your case). The attached patch should fix
this. You will have to rebuild nbest-lattice and then regenerate the
mesh file.
Andreas
-------------- next part --------------
diff -c -r1.83 NBest.cc
*** lm/src/NBest.cc 6 Jul 2012 06:43:26 -0000 1.83
--- lm/src/NBest.cc 12 Jul 2012 01:57:40 -0000
***************
*** 620,626 ****
/*
* save pronunciation info for previous word
*/
! if (prevWordInfo) {
prevWordInfo->phones = strdup(phones);
assert(prevWordInfo->phones != 0);
--- 620,626 ----
/*
* save pronunciation info for previous word
*/
! if (prevWordInfo && phones[0] != '\0') {
prevWordInfo->phones = strdup(phones);
assert(prevWordInfo->phones != 0);
***************
*** 695,701 ****
/*
* save pronunciation info for last word
*/
! if (prevWordInfo) {
prevWordInfo->phones = strdup(phones);
assert(prevWordInfo->phones != 0);
--- 695,701 ----
/*
* save pronunciation info for last word
*/
! if (prevWordInfo && phones[0] != '\0') {
prevWordInfo->phones = strdup(phones);
assert(prevWordInfo->phones != 0);
More information about the SRILM-User
mailing list