<div dir="ltr">Thanks very much, this works!<div>I have attached the patch wrt 1.7.0, it's almost the same.</div><div><br></div><div>Best,</div><div><br></div><div>Juan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Sep 19, 2013 at 9:27 PM, Andreas Stolcke <span dir="ltr"><<a href="mailto:stolcke@icsi.berkeley.edu" target="_blank">stolcke@icsi.berkeley.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>The attached patch should fix it. Note
this still doesn't support vocabularies larger than 2^32, but the
number of higher-order ngrams can now be 2^64. <br>
<br>
Thanks for reporting this problem!<span class="HOEnZb"><font color="#888888"><br>
<br>
Andreas</font></span><div><div class="h5"><br>
<br>
<br>
On 9/19/2013 4:13 AM, Juan Pino wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr">Hello,
<div><br>
</div>
<div>I am running this command with version 1.7.0 (the purpose
is to fix the format of my input lm):</div>
<div><br>
</div>
<div>srilm1.7.0/bin/i686-m64/ngram -debug 1 -order 4 -lm
MY_LM_IN_ARPA_FORMAT -write-lm MY_OUTPUT_LM</div>
<div><br>
</div>
<div>I get this error:</div>
<div><br>
</div>
<div>line 6: ngram number -1840328771 out of range<br>
</div>
<div><br>
</div>
<div>This is because I have this header in my input lm:</div>
<div>ngram 4=2454638525<br>
</div>
<div><br>
</div>
<div>So the number of 4grams is bigger than the maximum 32-bit
int.</div>
<div><br>
</div>
<div>I've fixed it by replacing</div>
<div>int nNgrams;</div>
<div>by</div>
<div>long nNgrams;</div>
<div>at line 497 in lm/src/NgramLM.cc and by replacing</div>
<div>} else if (sscanf(line, "ngram %d=%d", &thisOrder,
&nNgrams) == 2) {</div>
<div>by</div>
<div>} else if (sscanf(line, "ngram %d=%ld", &thisOrder,
&nNgrams) == 2) {<br>
</div>
<div>at line 515 in lm/src/NgramLM.cc</div>
<div><br>
</div>
<div>Are there other places in the code that I should change ?
Is there a better solution for my problem ?</div>
<div><br>
</div>
<div>Thanks very much,</div>
<div><br>
</div>
<div>Juan</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><div class="im"><pre>_______________________________________________
SRILM-User site list
<a href="mailto:SRILM-User@speech.sri.com" target="_blank">SRILM-User@speech.sri.com</a>
<a href="http://www.speech.sri.com/mailman/listinfo/srilm-user" target="_blank">http://www.speech.sri.com/mailman/listinfo/srilm-user</a></pre>
</div></blockquote>
<br>
</div>
</blockquote></div><br></div>