<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Alex,<br>
      <br>
      I haven't looked at your example in detail, but two hints:<br>
      <br>
      1) debug your LM evaluation using ngram -factored first (before
      moving on to lattice rescoring)<br>
      2) follow the steps in $SRILM/flm/test/tests/ngram-factored and
      make sure sure you are (a) inputting and producing files in
      similar format and (b) supplying the right options.<br>
      <br>
      Once you have that working, move on to lattice-tool.   The word
      strings in your lattices should be the same as the input to ngram
      -factored -ppl ...<br>
      <br>
      Andreas <br>
      <br>
      On 1/26/2014 10:01 PM, alex tudor wrote:<br>
    </div>
    <blockquote
cite="mid:CAM6aWROw9cMOo0Qb+kZSXLhw5+YTH8wLVY2C02BtVKNzwSJv+g@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Hi,</div>
        <div><br>
        </div>
        I wish to use FLM in speech recognition. So I've done a factored
        language model for a small text:
        <div><i>fngram-count -factor-file flm_config_kn.txt -text
            textLM.txt -write-counts textFLM_kn.count -lm textFLM_kn.lm</i><br>
        </div>
        <div>
          <div><br>
          </div>
          <div>flm_config_kn.txt:</div>
          <div>
            <div><i>W : 2 W(-1) P(-1) textFLM_kn.count textFLM_kn.lm 3</i></div>
            <div><i>W1,P1  W1 kndiscount gtmin 1 interpolate</i></div>
            <div><i>P1     P1 kndiscount gtmin 1 </i></div>
            <div><i>0      0  kndiscount gtmin 1 </i></div>
          </div>
          <div><br>
          </div>
          <div>Finally textFLM_kn.lm is:<br>
          </div>
          <div>
            <div><i>\data\</i></div>
            <div><i>ngram 0x0=510</i></div>
            <div><i>ngram 0x1=0</i></div>
            <div><i>ngram 0x2=1378</i></div>
            <div><i>ngram 0x3=1978</i></div>
            <div><i><br>
              </i></div>
            <div><i>\0x0-grams:</i></div>
            <div><i>-1.746398<span style="white-space:pre-wrap"> </span></s></i></div>
            <div><i>-99<span style="white-space:pre-wrap"> </span><s></i></div>
            <div><i>-2.252263<span style="white-space:pre-wrap"> </span>W-A</i></div>
            <div><i>-3.047544<span style="white-space:pre-wrap"> </span>W-ABUNDENTE</i></div>
          </div>
          <div><i>....</i></div>
          <div><br>
          </div>
          <div>Afterwards I've tried to rescore a HTK word lattice for
            a bigram using the 'lattice-tool' and a HTK word lattice
            (bigram.lat):</div>
          <div><i>lattice-tool -read-htk -write-htk -in-lattice
              bigram.lat -htk-lmscale 10 -posterior-scale 10 -factored
              -lm textFLM_kn.lm -out-lattice bigramFLM_kn.lat</i><br>
          </div>
          <div><br>
          </div>
          <div>But I have an error in textFLM_kn.lm: line 2: error:
            couldn't form int for number of factored LMs in when reading
            FLM spec file</div>
          <div><br>
          </div>
          <div>What's wrong ? <span style="white-space:pre-wrap">I would
              be appreciated for any advice.</span></div>
          <div><br>
          </div>
          Sincerely yours,</div>
        <div>Alex</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SRILM-User site list
<a class="moz-txt-link-abbreviated" href="mailto:SRILM-User@speech.sri.com">SRILM-User@speech.sri.com</a>
<a class="moz-txt-link-freetext" href="http://www.speech.sri.com/mailman/listinfo/srilm-user">http://www.speech.sri.com/mailman/listinfo/srilm-user</a></pre>
    </blockquote>
    <br>
  </body>
</html>