Search SRILM-USER Archives

Match: Format: Sort by:
Search:

Re: htk-words-on-nodes option in lattice-tool

From: Andreas Stolcke <stolcke at ADDRESS HIDDEN>
Date: Thu, 12 Apr 2007 22:44:32 -0700

jpinto at ADDRESS HIDDEN wrote:
> Hello,
>
> I have a phoneme lattice (obtained from NOWAY decoder) with phoneme
> tokens on the links (edges). I wish to convert this to HTK format with
> phoneme info on nodes and I do the following:
>
> lattice-tool -in-lattice input.lat -read-htk -write-htk -out-lattice
> output.lattice -htk-words-on-nodes
>
> I observe that the output lattice has more number of nodes & links
> (NODES=448 LINKS=766) compared to the input lattice (N=65   L=383)
>
> when I dont give the option -htk-words-on-nodes, nodes and links remain
> the same.
>
> I dont understand why the number of nodes and links should increase. Am I
> missing something ? Any help in this regard would be very helpful.
>  
That's because when you move attributes from links to nodes you might
have to duplicate nodes to create
an equivalent lattice.  In fact, the way SRILM reads HTK lattices is by
converting each link to a node,
thereby enabling the -htk-words-on-nodes mapping.  Unfortunately, the
code is not smart enough to
avoid the duplication even when it is not really necessary given how the
links are originally labeled.

Note: lattice-tool is not meant to be a general HTK lattice format
manipulation tool. You would think HTK has
better tools for that.

Andreas

Click here to go to the SRILM home page.