<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
Hi Andreas, could you unsubscribe me from this mailing list please? Thanks a lot for all your help in the past.<BR>
&nbsp;<BR>
Regards,<BR>
&nbsp;<BR>
Sai<BR><BR>&gt; Date: Wed, 8 Oct 2008 15:29:47 +0200<BR>&gt; From: gwenole.lecorve@irisa.fr<BR>&gt; To: stolcke@speech.sri.com<BR>&gt; CC: srilm-user@speech.sri.com<BR>&gt; Subject: Re: Beginning and end of sentences tags<BR>&gt; <BR>&gt; Thank you for this quick and precise answer.<BR>&gt; However, when I launch my command (see below), I still do not get back <BR>&gt; the same lattice structure.<BR>&gt; command :<BR>&gt; &gt; lattice-tool -in-lattice /path/to/input.lat -out-lattice <BR>&gt; &gt; /path/to/output.lat<BR>&gt; &gt; -lm $LM<BR>&gt; &gt; -htk-logbase 2.71828<BR>&gt; &gt; -write-htk<BR>&gt; &gt; -read-htk<BR>&gt; &gt; -print-sent-tags<BR>&gt; &gt; -htk-logzero '-99'<BR>&gt; &gt; -no-htk-nulls<BR>&gt; &gt; -htk-words-on-nodes<BR>&gt; <BR>&gt; Then the result is as follows :<BR>&gt; &gt; # Header (generated by SRILM)<BR>&gt; &gt; VERSION=1.1<BR>&gt; &gt; UTTERANCE=/path/to/one.spf<BR>&gt; &gt; base=2.71828<BR>&gt; &gt; dir=f<BR>&gt; &gt; vocab=/path/to/dic<BR>&gt; &gt; start=0<BR>&gt; &gt; end=1<BR>&gt; &gt; NODES=6 LINKS=5<BR>&gt; &gt; # Nodes<BR>&gt; &gt; I=0 W=&lt;s&gt; t=0<BR>&gt; &gt; I=1 W=&lt;/s&gt; t=1.08<BR>&gt; &gt; I=2 W=le t=0.14 v=1<BR>&gt; &gt; I=3 W=chien t=0.33 v=1<BR>&gt; &gt; I=4 W=miaule t=0.83 v=1<BR>&gt; &gt; I=5 W=&lt;/s&gt; t=1.08<BR>&gt; &gt; # Links<BR>&gt; &gt; J=0 S=0 E=2 a=-55.36 l=-2.74741<BR>&gt; &gt; J=1 S=2 E=3 a=-72.28 l=-8.60446<BR>&gt; &gt; J=2 S=3 E=4 a=-72.28 l=-inf<BR>&gt; &gt; J=3 S=4 E=5 a=-91.5701 l=-2.87136<BR>&gt; &gt; J=4 S=5 E=1 l=-2.87136<BR>&gt; <BR>&gt; <BR>&gt; I notice 2 things :<BR>&gt; 1/ Evenif if !NULL are replaced by the sentence start/end tags, one more <BR>&gt; "eos" tag is added at the end of the lattice. Isn't it a problem since a <BR>&gt; P(&lt;/s&gt;|&lt;/s&gt;) would then be considered while computing the posteriors ? <BR>&gt; When writing words on edges the problem is the same (whereas the "bos" <BR>&gt; tag dissapears).<BR>&gt; 2/ Despite the "-htk-logzero -99" option, "-inf" is still returned. <BR>&gt; After a few additional experiments, it appears that the "-htk-logzero" <BR>&gt; option works when, for example, no LM rescoring is applied or when the <BR>&gt; "-no-expansion" option is enabled.<BR>&gt; <BR>&gt; I may misuse the lattice-tool command but I do not see how to preserve <BR>&gt; the original lattice structure (eventhough I know that SRILM converts <BR>&gt; HTK lattices into its own format and that my goal is maybe unreachable <BR>&gt; :-) ).<BR>&gt; <BR>&gt; Best regards,<BR>&gt; Gwénolé Lecorvé.<BR>&gt; <BR>&gt; Andreas Stolcke a écrit :<BR>&gt; &gt; Gwénolé Lecorvé wrote:<BR>&gt; &gt;&gt; Hi,<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; I'm currently trying to rescore language scores of lattices generated <BR>&gt; &gt;&gt; using the HTK toolkit and personal tools.<BR>&gt; &gt;&gt; Here is an example of lattice to be rescored :<BR>&gt; &gt;&gt;&gt; VERSION=1.0<BR>&gt; &gt;&gt;&gt; UTTERANCE=/path/to/one.spf<BR>&gt; &gt;&gt;&gt; acscale=1.00<BR>&gt; &gt;&gt;&gt; vocab=/path/to/dic<BR>&gt; &gt;&gt;&gt; N=290 L=942<BR>&gt; &gt;&gt;&gt; I=0 t=0.00 W=&lt;s&gt;<BR>&gt; &gt;&gt;&gt; I=1 t=0.14 W=le v=1<BR>&gt; &gt;&gt;&gt; I=2 t=0.33 W=chien v=1<BR>&gt; &gt;&gt;&gt; I=3 t=0.83 W=miaule v=1<BR>&gt; &gt;&gt;&gt; I=4 t=1.08 W=&lt;/s&gt;<BR>&gt; &gt;&gt;&gt; J=0 S=0 E=1 a=-55.36 l=-2973.43<BR>&gt; &gt;&gt;&gt; J=1 S=1 E=2 a=-72.28 l=-48.43<BR>&gt; &gt;&gt;&gt; J=2 S=2 E=3 a=-72.28 l=-87.30<BR>&gt; &gt;&gt;&gt; J=3 S=3 E=4 a=-91.57 l=-145.72<BR>&gt; &gt;&gt; You can notice that the tags for beginning/end of sentence are present.<BR>&gt; &gt;&gt; My problem is that once I launch lattice-tool (with <BR>&gt; &gt;&gt; -htk-words-on-nodes and -no-htk-nulls) on such a lattice the results <BR>&gt; &gt;&gt; (HTK format) looks like this :<BR>&gt; &gt;&gt;&gt; # Header (generated by SRILM)<BR>&gt; &gt;&gt;&gt; VERSION=1.1<BR>&gt; &gt;&gt;&gt; UTTERANCE=/path/to/one.spf<BR>&gt; &gt;&gt;&gt; base=2.71828<BR>&gt; &gt;&gt;&gt; dir=f<BR>&gt; &gt;&gt;&gt; vocab=/path/to/di<BR>&gt; &gt;&gt;&gt; start=0<BR>&gt; &gt;&gt;&gt; end=1<BR>&gt; &gt;&gt;&gt; NODES=6 LINKS=5<BR>&gt; &gt;&gt;&gt; # Nodes<BR>&gt; &gt;&gt;&gt; I=0 W=!NULL t=0<BR>&gt; &gt;&gt;&gt; I=1 W=!NULL t=1.08<BR>&gt; &gt;&gt;&gt; I=2 W=le t=0.14 v=1<BR>&gt; &gt;&gt;&gt; I=3 W=chien t=0.33 v=1<BR>&gt; &gt;&gt;&gt; I=4 W=miaule t=0.83 v=1<BR>&gt; &gt;&gt;&gt; I=5 W=!NULL t=1.08<BR>&gt; &gt;&gt;&gt; # Links<BR>&gt; &gt;&gt;&gt; J=0 S=0 E=2 a=-55.36 l=-2.74741<BR>&gt; &gt;&gt;&gt; J=1 S=2 E=3 a=-72.28 l=-9.61595<BR>&gt; &gt;&gt;&gt; J=2 S=3 E=4 a=-72.28 l=-inf<BR>&gt; &gt;&gt;&gt; J=3 S=4 E=5 a=-91.5701 l=-2.87136<BR>&gt; &gt;&gt;&gt; J=4 S=5 E=1 l=-2.87136<BR>&gt; &gt;&gt; Something strange happens : the "bos" and "eos" tags disappear and <BR>&gt; &gt;&gt; !NULL tags are introduced instead.<BR>&gt; &gt;&gt; Why aren't the "bos" and "eos" printed anymore and why are these <BR>&gt; &gt;&gt; !NULL tagged considered insteand ?<BR>&gt; &gt;&gt; Can't I just keep the same lattice structure as the one given in input ?<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; I'm facing this problem since several months and still did not find <BR>&gt; &gt;&gt; any solution. I would be really grateful if you help me.<BR>&gt; &gt; &lt;s&gt; and &lt;/s&gt; are replaced by !NULL because they are not necessary, <BR>&gt; &gt; since the start/end of sentence are implicit in the lattice structure.<BR>&gt; &gt; For example, when rescoring the lattice with an LM the initial node is <BR>&gt; &gt; implicitly treat as the &lt;s&gt; context.<BR>&gt; &gt;<BR>&gt; &gt; However, I can see how you would want to preserve these tags for some <BR>&gt; &gt; applications.<BR>&gt; &gt; If you download the beta version of srilm you will find a new option: <BR>&gt; &gt; lattice-tool -print-sent-tags will output &lt;s&gt; and &lt;/s&gt; in the lattice <BR>&gt; &gt; format (both HTK and PFSG).<BR>&gt; &gt;<BR>&gt; &gt; Andreas<BR>&gt; &gt;&gt;<BR>&gt; &gt;&gt; Regards,<BR>&gt; &gt;&gt; Gwénolé Lecorvé.<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; <BR><BR><br /><hr />ˇTrónchate de risa con los mejores capítulos de South Park en  <a href='http://video.msn.com/?mkt=es-es&vid=42a9e969-45ad-4c31-bff9-57629e71fac8&playlist=videoByUuids:uuids:e1daa69b-331b-4e99-8325-c936aaee9f97%2Cad4cb47a-90a8-4b2c-88da-116d2059f4a2%2Cddaade1e-82b2-4914-8277-35e45198f5c6%2C42860247-e337-4384-94d8-fa444cb4aea7&from=hotmail&tab=s1207179071824' target='_new'>MSN Vídeo!</a></body>
</html>