<div dir="ltr">Juan,<div><br></div><div>One of the things I would probably first check is to see if you're including way too many 4-grams then necessary. To reduce noise and one-off occurrences for higher order ngrams, you should probably at least use the -gt4min 2 option. In most cases the quality of the resultant LM improves although the count of actual ngrams included decreases. Did you do this?</div>


<div><br></div><div>&</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 19, 2013 at 4:13 AM, Juan Pino <span dir="ltr"><<a href="mailto:jmp84@cam.ac.uk" target="_blank">jmp84@cam.ac.uk</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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>_______________________________________________<br>
SRILM-User site list<br>
<a href="mailto:SRILM-User@speech.sri.com" target="_blank">SRILM-User@speech.sri.com</a><br>
<a href="http://www.speech.sri.com/mailman/listinfo/srilm-user" target="_blank">http://www.speech.sri.com/mailman/listinfo/srilm-user</a><br></blockquote></div><br></div></div>