[SRILM User List] Generate Probability Distribution

Kalpesh Krishna kalpeshk2011 at gmail.com
Sat Mar 11 11:32:11 PST 2017


Hello,
I have a context of words and I've built an N-gram language model using
./ngram-count. I wish to generate a probability distribution (over the
entire vocabulary of words) of the next word. I can't seem to be able to
find a good way to do this with ./ngram.
What's the best way to do this?
For example, if my vocabulary has words "apple, banana, carrot", and my
context is "apple banana banana carrot", I want a distribution like -
{"apple": 0.25, "banana": 0.5, "carrot": 0.25}.

Thank you,
Kalpesh Krishna
http://martiansideofthemoon.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.speech.sri.com/pipermail/srilm-user/attachments/20170312/135296ac/attachment.html>


More information about the SRILM-User mailing list