[SRILM User List] stdin and disambig tool

Andreas Stolcke stolcke at icsi.berkeley.edu
Wed Jun 11 11:23:53 PDT 2014

On 6/11/2014 11:07 AM, kamel nebhi wrote:
> Thanks Andreas, it works. But it's very slow.
> But it seems that the STDIN argument is slower than File argument...
> Is it just an feeling or is there anything to do to solve it ?
There is no reason it should be slower.

Of course if you invoke the disambig tool for every line of input then 
you're going to incur startup overhead (reading the LM for one thing) 
over and over, and that's going to make it slow.

If you want to generate input lines with "echo"  then you need to take 
care to invoke disamig only once, e.g.,

while true
     echo "a line of input"

     # check whether to break the loop etc.

done | disambig -text - other options ....

Hope this helps,


More information about the SRILM-User mailing list