<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>