srilm使用杂记

训练n-gram语言模型

ngram-count -text train.txt -order 5 -lm model -kndiscount -interpolate -gt3min 1 -gt4min 1

计算生成PPL

ngram -lm model -order 5 -ppl test.txt -debug 2> srilm.ppl

 

ppl与ppl1有和区别?

ppl = 10^(-logprob / (words - OOVs + sentences))
ppl1 = 10^(-logprob / (words - OOVs))

 

ref:

http://www.speech.sri.com/projects/srilm/manpages/srilm-faq.7.html

你可能感兴趣的:(使用)