[SRILM User List] ngam stdin/stdout
Anand Venkataraman
venkataraman.anand at gmail.com
Mon Oct 14 21:26:16 PDT 2013
bash$ echo $SENTENCE | ngram ... -ppl -
However, if you're planning to do this on a per-sentence basis, it's
inefficient.
You should ideally compute it on whole files using ngram -debug 1 and
post-process the output to extract ppls for individual sentences. That way
you can get away with not having to invoke ngram/load the lm multiple times.
&
On Mon, Oct 14, 2013 at 8:44 PM, 徐 <xulikui123321 at 163.com> wrote:
> thank you very much, the problem is solved! if I want to computer
> perplexity of sentence, not a file, like ngram -lm language.lm -order 4
> -ppl " I MISS YOU" ,what's the command should i use( i want to
> compute perplexity with ngram on hadoop)?
>
>
>
>
>
>
> At 2013-10-15 09:29:52,"Anand Venkataraman" <venkataraman.anand at gmail.com>
> wrote:
>
> Pipe into the command and use - (hyphen) for the arg to -ppl
>
> &
> --
> Sent from my Google Nexus
> On Oct 14, 2013 6:26 PM, "徐" <xulikui123321 at 163.com> wrote:
>
>> when compute perplexity with ngram, the usage is ngram -lm language.lm
>> -order 4 -ppl test.txt.
>> but now I want compute perplexity with ngram from stdin, what's the
>> command should i use?
>>
>>
>>
>> _______________________________________________
>> SRILM-User site list
>> SRILM-User at speech.sri.com
>> http://www.speech.sri.com/mailman/listinfo/srilm-user
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.speech.sri.com/pipermail/srilm-user/attachments/20131014/778d2cd7/attachment.html>
More information about the SRILM-User
mailing list