<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 4/6/2012 9:01 AM, Meng Chen wrote:
<blockquote
cite="mid:CA+bc0mq3CmB0FpDN0_HXJF_Cxcee8sn4pZmT1K4TOEgcSt1gig@mail.gmail.com"
type="cite">Hi, I have a question about interpolating two
class-based language models. Suppose I have two class-based
language models trained from two different corpus.
<div>And each class-based lm has its own class definition files.
For example, the class definition file for class-lm1 is
lm1.classes, and lm2.classes for class-lm2. So my question is,
how to interpolate these two different class-based language
models? Can you give me the steps? with commands better.</div>
<div>
<ul>
<li>Do I need to use the -classes option when interpolating
them? <br>
</li>
</ul>
</div>
</blockquote>
You need to merge the class definitions for both LMs, making sure
that there are no name conflicts. If necessary rename class labels
CLASS01234 to LM1_CLASS01234 etc., in both the LM and the class
definition files, then combine the two class definitions into one
file, then interpolate the models.<br>
<blockquote
cite="mid:CA+bc0mq3CmB0FpDN0_HXJF_Cxcee8sn4pZmT1K4TOEgcSt1gig@mail.gmail.com"
type="cite">
<div>
<ul>
<li>Do I need to use the -bays 0 option to interpolate them
dynamically?</li>
</ul>
</div>
</blockquote>
Yes, you want use something like<br>
<br>
ngram -lm LM1 -mix-lm LM2 -lambda L -classes
MERGED_CLASS_DEFINITIONS -bayes 0<br>
<br>
<blockquote
cite="mid:CA+bc0mq3CmB0FpDN0_HXJF_Cxcee8sn4pZmT1K4TOEgcSt1gig@mail.gmail.com"
type="cite">
<div>I also confused about the expand class operation. If I expand
the class-based language model to word-based language model,
does the perplexity change with the same test set ?</div>
</blockquote>
ngram -expand-classes is an approximation, so you won't get exactly
the same ppl, but something close.<br>
<br>
Andreas <br>
<br>
</body>
</html>