[SRILM User List] Question about lattice-tool -nbest-decode

Andreas Stolcke stolcke at icsi.berkeley.edu
Thu Jul 26 15:35:00 PDT 2012

On 7/26/2012 2:00 PM, xinrui yu wrote:
> Hi All,
> I'm new to srilm and I have some questions about finding nbest result 
> by using srilm.
> I try Srilm by the command "./lattice-tool -read-htk -in-lattice 
> test.lat -nbest-decode 10   -out-nbest-dir my_nbest_dir". I indeed get 
> 10 results. But are the result placed in order?  I read from manual 
> page said that they are placed in order by default, I think they 
> should placed according to the score (combine the acoustic and lm 
> score) in front of it. But from what i have get, it's not. Am I 
> misunderstanding something?
The output is sorted by score.   You are probably not considering the 
way that the combined score is computed.
You need to take the acoustic score, and added the weighted LM score and 
word insertion penalty. The LM weight and insertion penalties might have 
default values encoded in the lattices.  You can override them on the 
command line.
You might get the output you expect by using -htk-lm-scale 1 and 
-htk-wdpenalty 0, but that will probably not be the best result in terms 
of word error.

> I also notice that there are another command callled "nbest-lattice". 
> I try to use it as well but it seems it does not accept HTK lattice. 
> So could it be used to find nbest result. And what's the different 
> bettwen lattice-tool and nbest-lattice? How to decide which one should 
> be used?
nbest-lattice takes nbest lists as INPUT and  constructs a special type 
of lattice representing word posterior probabilities.
So it is not what you need.
> Another question is that I read from manual page there is one option 
> called *-nbest-backtrace *which could preserve word-level timemarks 
> and scores. Is there similar option for lattice tool? What if I want 
> to keep those information while using lattice-tool?
No, sorry.


> Thanks!
> Liz
> _______________________________________________
> SRILM-User site list
> SRILM-User at speech.sri.com
> http://www.speech.sri.com/mailman/listinfo/srilm-user

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

More information about the SRILM-User mailing list