Calculating Perplexity

590 views
Skip to first unread message

Y91

unread,
Feb 5, 2016, 11:36:30 AM2/5/16
to kaldi-help
Hi Guys,

Quick Question: Given G.fst and some held out text, is there code in kaldi that would compute the perplexity for me?

Thanks!

Daniel Povey

unread,
Feb 5, 2016, 1:00:06 PM2/5/16
to kaldi-help
No, there isn't. 
Normally you would compute the perplexity before converting the language model into an FST format.
Dan


--
You received this message because you are subscribed to the Google Groups "kaldi-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Y91

unread,
Feb 14, 2016, 12:50:38 AM2/14/16
to kaldi-help, dpo...@gmail.com
Hey Dan,

in tools/kaldi_lm I see some useful scripts for training LMs. In one of the train scripts, I see how the perplexity has been calculated. The binary 'compute_ perplexity' has been used in a pipe that works with "ngrams". I also see how ngrams can be extracted from raw text. 

The question is, if I already have an LM in ARPA format, how can I calculate the perplexity in that case on some held out text?

Thanks a lot!

Daniel Povey

unread,
Feb 14, 2016, 12:53:29 AM2/14/16
to Y91, kaldi-help
I recommend using the SRILM toolkit for this.  I believe the 'ngram' command has options for this.  Consult the SRILM manual.
Dan

Reply all
Reply to author
Forward
0 new messages