Class-based LM using the SRILM toolkit?

Andreas Stolcke stolcke at speech.sri.com
Tue May 29 20:56:03 PDT 2007


> 
> Dear Dr. Stolcke,
> 
> Thank you once again for your invaluable help.
> 
> I have now developed two LMs using your toolkit - a trigram word-based model
> and a class-based model (static models). I now want to interpolate them and
> then apply some form of smoothing on the resultant LM. The ngram program in
> the toolkit has a -mix-lm option which allows linear interpolation; the
> manpages for that option mention:
> 
> "*NOTE: *Unless *-bayes *(see below) is specified, *-mix-lm *triggers a
> static interpolation of the models in memory. In most cases a more
> efficient, dynamic interpolation is sufficient, requested by *-bayes
> 0*.**Also, mixing models of different type (
> e.g., word-based and class-based) will *only *work correctly with dynamic
> interpolation."
> 
> What is dynamic interpolation? Is it applicable in my case? Can

Dynamic interpolation means that the probabilities of the interpolated model
are computed on-the-fly, at test time.
Static interpolation, by contrast, means that a single model is created
ahead of testing, containing the interpolated probabilities in the 
usual backoff format.  This is only possible for models of the same type,
as explained in the note above.

> mixing/interpolation of these models be perfomed only with the -dynamic
> option? In that case, how?

The -dynamic option has nothing to do with dynamic interpolation of the
kind we are discussing here.
Dynamic interpolation is enabled by the -bayes option.

> 
> Also, what is the -bayes interpolation method about? The manpages say for
> the -bayes option:
> "Interpolate the second and the main model using posterior probabilities for
> local N-gram-contexts of length *length*."
> What are you referring to by "N-gram contexts"? Are only the posterior
> probabilities interpolated here? If possible, please provide me with a link
> to a reference text etc. where I can learn more about this.

For an explanation of Bayesian interpolation please consult the technical
report cited at the bottom of the ngram(1) man page.  You can get it at
http://www.speech.sri.com/cgi-bin/run-distill?papers/lm95-report.ps.gz
then check Section 2.3.

Andreas 




More information about the SRILM-User mailing list