format error in lattice file...

Andreas Stolcke stolcke at
Tue Oct 30 21:23:22 PDT 2007

Partha Lal wrote:
> Hello,
> I'm trying to get a lattice error rate from an htk format lattice file 
> but keep getting a format error:
> > lattice-tool -read-htk -in-lattice 
> results/globalphone-sp/lattices/mfcc13+dd/hmm4_2_512/ 
> -out-lattice 
> results/globalphone-sp/lattices/mfcc13+dd/hmm4_2_512/SP002_21.pfsg
The PFSG lattice format is NOT the one used by nbest-lattice.  
nbest-lattice understands two kinds of format designed to encode
word posterior probabilities, both described in the wlat-format(5) man page.

The first format, word posterior lattices, is produced by lattice-tool 
The second format, word confusion networks, aka sausages, is produced by 
lattice-tool -write-mesh .


> > nbest-lattice -read 
> results/globalphone-sp/lattices/mfcc13+dd/hmm4_2_512/SP002_21.pfsg 
> -lattice-error -reference `cat 
> data/globalphone-sp/wrdfile/rmn/SP002/SP002_21.wrd`
> results/globalphone-sp/lattices/mfcc13+dd/hmm4_2_512/SP002_21.pfsg: 
> line 2: unknown keyword
> format error in lattice file
> I can't see what's wrong with my lattice files - I've made them 
> available at .
> Can anyone suggest what might be wrong?
> Thanks,
> Partha

More information about the SRILM-User mailing list