Patch for ngram.cc
Andreas Stolcke
stolcke at speech.sri.com
Thu Oct 4 12:39:09 PDT 2001
Dear All,
a rather embarassing bug in ngram causes it to mess up the mixture
weight for the second mixture model (-mix-lm) when three or more
models are interpolated. This problem exists in all versions of SRILM
prior to 1.2 (which won't be released for a while), so please apply the
patch below if this bug affects you.
--Andreas
*** /tmp/T0EFaaMN Thu Oct 4 12:32:01 2001
--- ngram.cc Wed Oct 3 19:51:14 2001
***************
*** 463,470 ****
mixLambda2/totalLambda);
}
mixLM = makeMixLM(mixFile, *vocab, classVocab, order, mixLM,
! 1.0 - totalLambda - mixLambda);
useLM = new BayesMix(*vocab, *useLM, *mixLM, bayesLength,
mixLambda, bayesScale);
--- 463,472 ----
mixLambda2/totalLambda);
}
+ double mixLambda1 = 1.0 - totalLambda - mixLambda;
+
mixLM = makeMixLM(mixFile, *vocab, classVocab, order, mixLM,
! mixLambda1/(mixLambda1 + totalLambda));
useLM = new BayesMix(*vocab, *useLM, *mixLM, bayesLength,
mixLambda, bayesScale);
More information about the SRILM-User
mailing list