📄 ppl-scripts.html
字号:
<! $Id: ppl-scripts.1,v 1.3 2002/04/19 14:11:30 stolcke Exp $><HTML><HEADER><TITLE>ppl-scripts</TITLE><BODY><H1>ppl-scripts</H1><H2> NAME </H2>ppl-scripts, add-ppls, compare-ppls, compute-best-mix, compute-best-sentence-mix, hits-from-log, ppl-from-log, subtract-ppls - manipulate perplexities<H2> SYNOPSIS </H2><B> add-ppls </B>[<I>ppl-file</I>..]<BR><B> subtract-ppls </B><I> ppl-file1 </I>[<I>ppl-file2</I>...]<BR><B> ppl-from-log </B>[<I>ppl-file</I>...]<BR><B> hits-from-log </B>[<I>ppl-file</I>...]<BR><B> compare-ppls </B>[<B>mindelta=</B><I>D</I><B></B>]<I> ppl-file1 </I><I> ppl-file2 </I><BR><B> compute-best-mix </B>[<B>lambda='</B><I>l1 l2</I><B></B>...<B>'</B><B>precision=</B><I>P</I><B></B>]<I> ppl-file1 </I>[<I>ppl-file2</I>...]<BR><B> compute-best-sentence-mix </B>[<B>lambda='</B><I>l1 l2</I><B></B>...<B>'</B><B>precision=</B><I>P</I><B></B>]<I> ppl-file1 </I>[<I>ppl-file2</I>...]<H2> DESCRIPTION </H2>These scripts process the output of the <A HREF="ngram.html">ngram(1)</A>option<B> -ppl </B>to extract various useful information.They are particularly convenient in analyzing the performance (perplexity) of language models on specific subsets of the test data,or to compare and combine multiple models.<P><B> add-ppls </B>takes several ppl output files and computes an aggregate perplexity andcorpus statistics.Its output is suitable for subsequent manipulation by<B> add-ppls </B>or<B>subtract-ppls</B>.<B></B><P><B> subtract-ppls </B>similarly computes an aggregate perplexity by removing thestatistics of zero or more<I> ppl-file2 </I>from those in<I>ppl-file1</I>.<I></I>Its output is suitable for subsequent manipulation by<B> add-ppls </B>or<B>subtract-ppls</B>.<B></B><P><B> ppl-from-log </B>recomputes the total perplexities and statistics from individuallines in<B> ngram -debug 2 -ppl </B>output.Combined with some filtering of that output this allows computing perplexities on interesting subsets of words.<P><B> hits-from-log </B>computes N-gram hit rates from<B> ngram -debug 2 -ppl </B>output.<P><B> compare-ppls </B>tallies the number of words for which two language models produce the same,higher, or lower probabilities.The input files should be <B> ngram -debug 2 -ppl </B>output for the two models on the same test set.The parameter<I> D </I>is the minimum absolute difference for two log probabilities to be considered different (the default is 0).<P><B> compute-best-mix </B>takes the output of several<B> ngram -debug 2 -ppl </B>runs on the same test set and computes the optimal interpolation weights for the corresponding models,i.e., the weights that minimize the perplexity of an interpolated model.Initial weights may be specified as<I>l1 l2 ...</I>.<I></I>The computation is iterative and stops when the interpolation weightschange by less than<I> P </I>(default 0.001).<P><B> compute-best-sentence-mix </B>similarly optimizes the weights for sentence-level interpolation of LMs.It requires input files generated by<B>ngram -debug 1 -ppl</B>.<B></B>(Sentence-level mixtures can be implemented using the <B> ngram -hmm </B>option, by constructing a suitable HMM structure.)<H2> SEE ALSO </H2><A HREF="ngram.html">ngram(1)</A>.<H2> BUGS </H2>All scripts depend on the idiosyncrasies of<B> ngram -ppl </B>output.<H2> AUTHOR </H2>Andreas Stolcke <stolcke@speech.sri.com>.<BR>Copyright 1995-2002 SRI International</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -