SRILM bug-fix
Andreas Stolcke
stolcke at speech.sri.com
Thu Jun 29 18:27:32 PDT 2006
Recent versions of SRILM have a bug in the option handling of
ngram, hidden-ngram, and lattice-tool concerning interpolated LMs
with more than 6 components.
The bug is triggered by the use of -mix-lm[789] in conjunction with the -bayes
option. This will be fixed in the next release, but that might
take a while, so I'm including a patch below.
This bug was found by Richard Zens of RWTH Aachen.
--Andreas
*** /tmp/T005lmct Thu Jun 29 06:02:25 2006
--- lm/src/ngram.cc Thu Jun 29 05:59:48 2006
***************
*** 738,744 ****
mixLambda6);
}
if (mixFile7) {
! useLM = makeMixLM(mixFile6, *vocab, classVocab, order, useLM,
mixLambda7,
mixLambda + mixLambda1 + mixLambda2 +
mixLambda3 + mixLambda4 + mixLambda5 +
--- 738,744 ----
mixLambda6);
}
if (mixFile7) {
! useLM = makeMixLM(mixFile7, *vocab, classVocab, order, useLM,
mixLambda7,
mixLambda + mixLambda1 + mixLambda2 +
mixLambda3 + mixLambda4 + mixLambda5 +
***************
*** 745,751 ****
mixLambda6 + mixLambda7);
}
if (mixFile8) {
! useLM = makeMixLM(mixFile6, *vocab, classVocab, order, useLM,
mixLambda8,
mixLambda + mixLambda1 + mixLambda2 +
mixLambda3 + mixLambda4 + mixLambda5 +
--- 745,751 ----
mixLambda6 + mixLambda7);
}
if (mixFile8) {
! useLM = makeMixLM(mixFile8, *vocab, classVocab, order, useLM,
mixLambda8,
mixLambda + mixLambda1 + mixLambda2 +
mixLambda3 + mixLambda4 + mixLambda5 +
***************
*** 752,758 ****
mixLambda6 + mixLambda7 + mixLambda8);
}
if (mixFile9) {
! useLM = makeMixLM(mixFile6, *vocab, classVocab, order, useLM,
mixLambda9, 1.0);
}
}
--- 752,758 ----
mixLambda6 + mixLambda7 + mixLambda8);
}
if (mixFile9) {
! useLM = makeMixLM(mixFile9, *vocab, classVocab, order, useLM,
mixLambda9, 1.0);
}
}
*** /tmp/T005lmct Thu Jun 29 06:02:25 2006
--- lm/src/hidden-ngram.cc Thu Jun 29 06:01:12 2006
***************
*** 1178,1184 ****
mixLambda6);
}
if (mixFile7) {
! useLM = makeMixLM(mixFile6, *vocab, classVocab, order, useLM,
mixLambda7,
mixLambda + mixLambda1 + mixLambda2 +
mixLambda3 + mixLambda4 + mixLambda5 +
--- 1178,1184 ----
mixLambda6);
}
if (mixFile7) {
! useLM = makeMixLM(mixFile7, *vocab, classVocab, order, useLM,
mixLambda7,
mixLambda + mixLambda1 + mixLambda2 +
mixLambda3 + mixLambda4 + mixLambda5 +
***************
*** 1185,1191 ****
mixLambda6 + mixLambda7);
}
if (mixFile8) {
! useLM = makeMixLM(mixFile6, *vocab, classVocab, order, useLM,
mixLambda8,
mixLambda + mixLambda1 + mixLambda2 +
mixLambda3 + mixLambda4 + mixLambda5 +
--- 1185,1191 ----
mixLambda6 + mixLambda7);
}
if (mixFile8) {
! useLM = makeMixLM(mixFile8, *vocab, classVocab, order, useLM,
mixLambda8,
mixLambda + mixLambda1 + mixLambda2 +
mixLambda3 + mixLambda4 + mixLambda5 +
***************
*** 1192,1198 ****
mixLambda6 + mixLambda7 + mixLambda8);
}
if (mixFile9) {
! useLM = makeMixLM(mixFile6, *vocab, classVocab, order, useLM,
mixLambda9, 1.0);
}
}
--- 1192,1198 ----
mixLambda6 + mixLambda7 + mixLambda8);
}
if (mixFile9) {
! useLM = makeMixLM(mixFile9, *vocab, classVocab, order, useLM,
mixLambda9, 1.0);
}
}
*** /tmp/T005lmct Thu Jun 29 06:02:25 2006
--- lattice/src/lattice-tool.cc Thu Jun 29 06:01:53 2006
***************
*** 1128,1134 ****
mixLambda6);
}
if (mixFile7) {
! useLM = makeMixLM(mixFile6, *vocab, classVocab, order, useLM,
mixLambda7,
mixLambda + mixLambda1 + mixLambda2 +
mixLambda3 + mixLambda4 + mixLambda5 +
--- 1128,1134 ----
mixLambda6);
}
if (mixFile7) {
! useLM = makeMixLM(mixFile7, *vocab, classVocab, order, useLM,
mixLambda7,
mixLambda + mixLambda1 + mixLambda2 +
mixLambda3 + mixLambda4 + mixLambda5 +
***************
*** 1135,1141 ****
mixLambda6 + mixLambda7);
}
if (mixFile8) {
! useLM = makeMixLM(mixFile6, *vocab, classVocab, order, useLM,
mixLambda8,
mixLambda + mixLambda1 + mixLambda2 +
mixLambda3 + mixLambda4 + mixLambda5 +
--- 1135,1141 ----
mixLambda6 + mixLambda7);
}
if (mixFile8) {
! useLM = makeMixLM(mixFile8, *vocab, classVocab, order, useLM,
mixLambda8,
mixLambda + mixLambda1 + mixLambda2 +
mixLambda3 + mixLambda4 + mixLambda5 +
***************
*** 1142,1148 ****
mixLambda6 + mixLambda7 + mixLambda8);
}
if (mixFile9) {
! useLM = makeMixLM(mixFile6, *vocab, classVocab, order, useLM,
mixLambda9, 1.0);
}
}
--- 1142,1148 ----
mixLambda6 + mixLambda7 + mixLambda8);
}
if (mixFile9) {
! useLM = makeMixLM(mixFile9, *vocab, classVocab, order, useLM,
mixLambda9, 1.0);
}
}
More information about the SRILM-User
mailing list