Score sentence with SRILM

214 views
Skip to first unread message

Cristina Garbacea

unread,
Aug 15, 2015, 10:54:37 AM8/15/15
to Joshua Technical Support
Hi,

I have built my own language model with SRILM that I would like to use in order to score some sentences. One way to do this would be:

./ngram -order 3 -lm allrelevant2013.lm -ppl input.sentences -debug 1


where input.sentences is a file on disk. I would like to know if it is possible to score one sentence without writing it to a file. I have tried


./ngram -order 3 -lm allrelevant2013.lm -ppl "This is a sample sentence" -debug 1


but I get "No such file or directory" error because it expects it to be a file. Writing each and every sentence I want to score to a file is pretty inconvenient, is it possible to score it straight away?


Thanks,

Cristina

Matt Post

unread,
Aug 16, 2015, 1:08:19 PM8/16/15
to joshua_...@googlegroups.com
Hi,

Try this:

echo "This is a sample sentence" | ./ngram [arguments -ppl -

matt


--
You received this message because you are subscribed to the Google Groups "Joshua Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joshua_suppor...@googlegroups.com.
To post to this group, send email to joshua_...@googlegroups.com.
Visit this group at http://groups.google.com/group/joshua_support.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages