[SRILM User List] classes-format question + followup question
Andreas Stolcke
stolcke at icsi.berkeley.edu
Fri Apr 22 13:18:35 PDT 2011
Fabian - wrote:
> Hi,
>
>
> thank you again for the quick help!
> I added the smoothing and the PPL dropped to 720 which is a bit
> better, but still above the range ~500 which would "feel" correct.
> Anyways,...
>
You might want to verify that your probabilities are normalized
correctly. Try ngram -debug 3 -ppl .
>
> ...I have another question:
>
> why can't i use the static interpolation for interpolating one class
> LMs and word LM? I use a class-based (from ngram-count) or one
> class-based with my own tags with the word-based LM. In the
> documentation it only says -mix-lm with static interpolation won't
> work correct?
I didn't realize you want to interpolate two class-based LMs. That
should work, you just need to keep the class labels distinct, nad
combine the class definition files in to one file.
> I want to build interpolated LMs (with -write-lm) to use them in my
> ASR, so far I simply used the static interpolation, which seems to
> work more or less OK.
You should be able to ngram -mix-lm -write-lm with two class-based LMs
but WITHOUT using the -classes option when doing so.
If you include the -classes it will be appended to the LM file.
Andreas
>
>
> -Fabian
>
> > Date: Wed, 20 Apr 2011 13:59:59 -0700
> > From: stolcke at ICSI.Berkeley.EDU
> > To: fabian_in_hongkong at hotmail.com
> > CC: srilm-user at speech.sri.com
> > Subject: Re: [SRILM User List] classes-format question
> >
> > Fabian - wrote:
> > > Hi,
> > > I'm still experimenting with class-based (actually POS) LMs. I use my
> > > own 61 classes/PoS. I built a class LM which works fine for decoding.
> > > But I also want to compute the perplexity. If I built a mapping file
> > > like mentioned in the classes-format manual page (with
> > > probabilities=1) I get a ppl of 8.
> > You mean when you replace all the words with their class labels?
> Yes
>
> >
> > > So I computed the probabilities for mapping class x to word j as
> followed:
> > >
> > > # word j in class x
> > > ---------------------------
> > > #occurences of class x + ....
>
>
> > >
> > > Now I get a ppl of ~1300. This seems a bit high!?
> > It depends. You might have to smooth these probabilities, just like
> > ngram probabilities.
> > Try
> >
> > # word j in class x + 1
> > ---------------------------
> > #occurences of class x + # classes
> >
> >
> > >
> > > I have a total of 20k mappings with a vocab of 12k! The LM is an
> > > interpolation of a pure 3g class LM and a 3g word LM. The word LM has
> > > usually a ppl of ~500. The ASR Error rate of the word based and
> > > interpolated are similar though.
> > Make sure you use -bayes 0 when interpolating word and class-based LMs.
> > You should not merge LMs of different types statically (without -bayes).
> >
> > Andreas
> >
> > >
> > > Can you help me?
> > > Thanks,
> > > Fabian
> > >
> ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > SRILM-User site list
> > > SRILM-User at speech.sri.com
> > > http://www.speech.sri.com/mailman/listinfo/srilm-user
> >
More information about the SRILM-User
mailing list