<div dir="ltr"><div><div><div><div>Hi,<br></div>long ago I used the ngram program as server. It is related to the switch -server-port.<br></div>This may be a solution.<br><br></div>Best,<br><br></div>Christophe<br><div><div>
<div><br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/15 徐 <span dir="ltr"><<a href="mailto:xulikui123321@163.com" target="_blank">xulikui123321@163.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="line-height:1.7;font-size:14px;font-family:arial">I have solved the problem of computer perplexity of per line string by use ngram, as follows(perl script):<div><div>foreach my $line(@lines){</div><div><span style="white-space:pre-wrap">      </span>$str = `echo $line | ngram -lm news.lm -ppl - -debug 1`;</div>
<div><span style="white-space:pre-wrap">  </span>print $str ."\n";</div><div><span style="line-height:1.7">}</span></div></div><div><span style="line-height:1.7">but if the language model too big, I should load the language every line. that's a waste of time, is there some method that I only should load the language model once? like replace the lm file (</span>news<span style="line-height:1.7">.lm) with a file pointer?</span></div>
</div><br><br><span title="neteasefooter"><span></span></span><br>_______________________________________________<br>
SRILM-User site list<br>
<a href="mailto:SRILM-User@speech.sri.com">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>