[SRILM User List] Interpreting ngram -ppl output in case of backoff

Andreas Stolcke stolcke at icsi.berkeley.edu
Wed Jun 5 14:03:50 PDT 2013


On 6/5/2013 4:23 AM, Sander Maijers wrote:
> Yes, there is confusion here. I did not specify the complete command 
> line that I used to invoke 'ngram', only the options that I believed 
> were relevant. Actually, I used the "-use-server" parameter (for the 
> ngram client invocation) ... I haven't read that the debug output is 
> more limited in this sense if you use the 'ngram' server. And I had 
> specified the same debug level with both the "'ngram' -server-port 
> ..." and "ngram -use-server ..." invocations) .
I suggest you first debug the probability computation without client/server.

Indeed, the client side has no way of knowing some of the debugging 
output from the server end (like what ngram order was used).  That's in 
the nature of the client/server interface.

However, you can elicit some additional information by giving -debug 2 
to the server side (which you said you did).  For example,

% ngram -unk -map-unk '@reject@' -lm 
$SRILM/lm/test/tests/ngram-count-gt/swbd.3bo.gz -debug 2 -server-port 8888
reading 33110 1-grams
reading 425750 2-grams
reading 268962 3-grams
starting prob server on port 8888
client 54671 at 192.150.186.222: connection accepted
client 54671 at 192.150.186.222: _R_E_M_O_T_E_L_M_V=2
client 54671 at 192.150.186.222: OK
client 54671 at 192.150.186.222: W <s> hi
client 54671 at 192.150.186.222: [2gram]OK -3.20362
client 54671 at 192.150.186.222: W <s> hi there
client 54671 at 192.150.186.222: [3gram]OK -1.88215
client 54671 at 192.150.186.222: W hi there </s>
client 54671 at 192.150.186.222: [2gram]OK -0.86183


Notice the [2gram], [3gram] etc.  Those are from the server looking up 
the ngrams.  The client only sees the probabilities being sent back.

Andreas




More information about the SRILM-User mailing list