[SRILM User List] use ngram computer perplexity of per line string on hadoop
徐
xulikui123321 at 163.com
Tue Oct 15 03:59:39 PDT 2013
I have solved the problem of computer perplexity of per line string by use ngram, as follows(perl script):
foreach my $line(@lines){
$str = `echo $line | ngram -lm news.lm -ppl - -debug 1`;
print $str ."\n";
}
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 (news.lm) with a file pointer?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.speech.sri.com/pipermail/srilm-user/attachments/20131015/075adc3a/attachment.html>
More information about the SRILM-User
mailing list