[SRILM User List] ngram option

Andreas Stolcke stolcke at icsi.berkeley.edu
Sun Nov 25 22:49:16 PST 2012


On 11/25/2012 10:37 PM, Somayeh Bakhshaei wrote:
> Hello All,
>
> I want to know if it is possible to pass a variable to ngram for ppl 
> counting?
>
> 4sen="this is my sentence."
> ngram -ppl $sen
You could use

echo "this is my sentence" | ngram -ppl -

The input data cannot be passed via command line options, but it can be 
read from stdin.

Andreas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.speech.sri.com/pipermail/srilm-user/attachments/20121125/b9e9326d/attachment.html>


More information about the SRILM-User mailing list