[SRILM User List] Fw: SRI help please

Andreas Stolcke stolcke at icsi.berkeley.edu
Tue Feb 12 12:05:48 PST 2013


Noor,

please submit your questions to srilm-user at speech.sri.com in the future 
(after joining the list).

On 2/12/2013 9:21 AM, Noor Noor wrote:
>
> Dear Sir,
>
> I want to interpolate LM, I followed this steps:
>
> 1. ngram -debug 2 -ppl text1.txt > L1.txt
> ngram -debug 2 -ppl text2.txt > L2.txt
>
> 2. ngram-class  -text text1.txt -class-counts 3 -classes cls1 
> -numclasses 2
>   ngram-class  -text text2.txt -class-counts 3 -classes cls2 
> -numclasses 2
> to get allcls
>
> 3. How I can use compute-best-mix to combine L1.txt L2.txt and how get 
> the result
>  Can write to me the right command to my input to get LP output ?

You run
         compute-best-mix L1.txt L2.txt
and use the first number after "best lambda" in the output as the 
-lambda value for ngram.

>
> 4. how I can combine cls1 and cls2?
You need to rename the class labels in the cls1 and cls2 files to not 
clash.  It might be easier (and actually work better) to infer classes 
from the union of text1.txt and text2.txt, and then use those classes in 
both component LMs.

Also, you don't mention the step of training the class-based LMs once 
you have the class definitions.  You need to use something like

             replace-words-with-classes classes=allcls text1.txt | \
             ngram-count -text - -lm LM1 ....

to build your class-based LMs.

> 5. Is the following command the right one to interpolate LM?
> /ngram -bayes 0 -lm LM1 -mix-lm LM2 -lambda //LP////-mix-lambda2 ... 
> -classes allcls/
> /
> /
> /what //-mix-lambda2 correct value for my input?/

With only two models to interpolate, the command would be

     ngram -bayes 0 -lm LM1 -mix-lm LM2 -lambda LP  -classes allcls

The second lambda value is inferred from LP since they have to add up to 1.

Andreas

> /
> /
> /
> /
> /please kindly can help me in this matter?/
> /
> /
> /Best Regards,/
> /
> /
> /Noor/
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.speech.sri.com/pipermail/srilm-user/attachments/20130212/2658c60d/attachment.html>


More information about the SRILM-User mailing list