<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 3/22/2010 11:33 PM, tuzhaopeng wrote:
<blockquote cite="mid:201003231433290350650@ict.ac.cn" type="cite">
  <meta http-equiv="Content-Type"
 content="text/html; charset=ISO-8859-1">
  <meta content="MSHTML 6.00.2900.2963" name="GENERATOR">
  <link
 href="BLOCKQUOTE%7Bmargin-Top:%200px;%20margin-Bottom:%200px;%20margin-Left:%202em%7D"
 rel="stylesheet">
  <div>Hi&nbsp; People,</div>
  <div>&nbsp;</div>
  <div>I meet a problem when I train a language model with option
"-text-has-weights".</div>
  <div>&nbsp;</div>
</blockquote>
<br>
<blockquote cite="mid:201003231433290350650@ict.ac.cn" type="cite"><br>
  <div>&nbsp;</div>
  <div>Then I went to look for more information on Internet, and found
that for&nbsp;the option "-float-counts", <span class="Apple-style-span"
 style="word-spacing: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: medium; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2;"><font
 face="Verdana" size="2">only certain discounting </font></span></div>
</blockquote>
correct.<br>
<blockquote cite="mid:201003231433290350650@ict.ac.cn" type="cite">
  <div><span class="Apple-style-span"
 style="word-spacing: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: medium; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2;"><font
 face="Verdana" size="2">methods support non-integer counts (wbdiscount
and cdiscount). So I use the wb-discount with the command:</font></span></div>
  <div><span class="Apple-style-span"
 style="word-spacing: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: medium; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2;"></span>&nbsp;</div>
  <div><span class="Apple-style-span"
 style="word-spacing: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: medium; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2;"><strong><font
 face="Verdana" size="2">./ngram-count&nbsp;-text-has-weights&nbsp;test&nbsp;-order&nbsp;3&nbsp;-lm&nbsp;test.o3.lm.gz&nbsp;-float-counts&nbsp;-unk&nbsp;-wbdiscount&nbsp;-debug&nbsp;3</font></strong></span></div>
</blockquote>
<br>
The problem here is <br>
<br>
1) you forgot the -text option before your filename.&nbsp;&nbsp;
-text-has-weights is a switch that itself doesn't take an argument.<br>
2) With fractional counts the default minimum counts for retaining
ngrams in the LM still apply.&nbsp; So you might want to add these options
to ensure that all your ngrams end up in the model:<br>
<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; -gt1min 0 -gt2min 0 -gt3min 0<br>
<br>
FYI, the default values are :<br>
<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; -gt1min 1 -g2min 1 -gt3min 2<br>
<br>
Andreas <br>
<br>
<blockquote cite="mid:201003231433290350650@ict.ac.cn" type="cite">
  <div><span class="Apple-style-span"
 style="word-spacing: 0px; font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; font-size: medium; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; text-transform: none; color: rgb(0, 0, 0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2;">
  </span></div>
  <div>&nbsp;</div>
  <div>and the output information is:</div>
  <div>&nbsp;</div>
  <div>
  <div>using&nbsp;WittenBell&nbsp;for&nbsp;1-grams</div>
  <div>using&nbsp;WittenBell&nbsp;for&nbsp;2-grams</div>
  <div>using&nbsp;WittenBell&nbsp;for&nbsp;3-grams</div>
  <div>warning:&nbsp;distributing&nbsp;1&nbsp;left-over&nbsp;probability&nbsp;mass&nbsp;over&nbsp;2&nbsp;zeroton&nbsp;words</div>
  <div>writing&nbsp;3&nbsp;1-grams</div>
  <div>writing&nbsp;0&nbsp;2-grams</div>
  <div>writing&nbsp;0&nbsp;3-grams</div>
  </div>
  <br>
</blockquote>
<br>
</body>
</html>