<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 5/22/2012 10:56 AM, Lluís Formiga i Fanals wrote:
    <blockquote cite="mid:9D363DB8-11DF-4534-AEB5-058E96E3A74C@upc.edu"
      type="cite">Hi,
      <div><br>
      </div>
      <div><span class="Apple-tab-span" style="white-space:pre"> </span>I
        was trying to execute the following command:</div>
      <div><br>
      </div>
      <div><span class="Apple-tab-span" style="white-space:pre">
          lattice-tool -in-lattice-list lattice_lists.txt -read-htk -lm
          /veu4/usuaris24/lluisf/EMS/misspelling2012/lm/interpolated-lm.en
          -write-mesh-dir out -keep-unk</span></div>
      <div><br>
      </div>
      <div><span class="Apple-tab-span" style="white-space:pre"> </span>but
        I find that unks ("<unk>") are still on the written CN
        (-write-mesh).</div>
      <div><br>
      </div>
      <div><span class="Apple-tab-span" style="white-space:pre"> </span>Does
        -keep-unk option work only for lattices output? Am I doing
        something wrong?</div>
    </blockquote>
    No, the code is working as intended.<br>
    <br>
    The option is described as <br>
           -keep-unk<br>
                  Treat out-of-vocabulary words as <unk> but
    preserve their labels in lattice output.<br>
    <br>
    What you are outputting is confusion networks, not lattices.  In the
    CN building process, lattice nodes that are mapped to <unk> 
    are treated as equivalent, and the word information is lost in the
    process.<br>
    <br>
    I would suggest that you simple do your lattice rescoring with
    -keep-unk, output the rescored lattices, and then run lattice-tool a
    second time without -keep-unk and without the -vocab option, so all
    word labels are preserved (all words are implicitly added to the
    vocabulary).<br>
    <br>
    Andreas <br>
    <br>
    <br>
    <blockquote cite="mid:9D363DB8-11DF-4534-AEB5-058E96E3A74C@upc.edu"
      type="cite">
      <div><br>
      </div>
      <div><span class="Apple-tab-span" style="white-space:pre"> </span>Thanks,</div>
      <div><br>
      </div>
      <div>Lluís</div>
      <div>
        <div>
          <font class="Apple-style-span" color="#4181c0" face="Arial"
            size="2"><span class="Apple-style-span"
              style="-webkit-border-horizontal-spacing: 2px;
              -webkit-border-vertical-spacing: 2px; "><b><span><img
                    id="f7e1c668-986c-413a-93eb-7ffb72eed032"
                    apple-width="yes" apple-height="yes"
                    src="cid:part1.06020805.01010900@icsi.berkeley.edu"
                    height="133" width="589"></span>
              </b></span></font></div>
        <div><br>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>