[SRILM User List] Did the network protocol change in srilm 1.7?

Lars Jørgen Solberg supersolberg at gmail.com
Thu Jan 24 07:34:02 PST 2013


Hi

I have a project where I use the server functionality in srilm, which 
worked fine until i upgraded to version 1.7.

What I do can be outlined as (code snippets are in python):

1 launch a server
$ ngram -server-port 5000 ...

2 connect to the server
conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
conn.connect(("localhost", 5000))

3 send a bunch of ngrams separated by newlines
conn.sendall('A A A\nB B B\nC C C\n')

4 recieve the probabilites
reply = conn.recv(4096)

This works fine in version 1.6, but in 1.7 the reply only contains one 
probability.

I guess that one way I can get around this is by only sending one ngram 
at the time, but I would rather not do this as I get increased 
performance when sending and receiving them in chunks.

Is this change in behavior intentional? If so, is there a way of sending 
several ngrams at once to a server?

Regards
Lars Jørgen Solberg

-- 
The moth of wrath goads the rat on! The rat goes berserk!



More information about the SRILM-User mailing list