[SRILM User List] Perl client-server with SWIG and SRILM

Manuel Alves beleira at gmail.com
Fri May 14 08:29:10 PDT 2010


Sorry again.

I want to use this function in Perl but i dont know how to call it because i
think it needs a point

float getWordProb(Ngram* ngram, unsigned w, unsigned* context) {
    return (float)ngram->wordProb(w, context);
}

The variable *context* it seems a point to a string.
How do i call it  in perl?
it seems to me that perl doesnt use much the pointers.
Thanks ,
Manel.

On Wed, May 12, 2010 at 6:53 PM, Andreas Stolcke <stolcke at speech.sri.com>wrote:

> In message <AANLkTilotQsIzYph3pJEHP-zxPBMK7ibw_zrVP_5bvdA at mail.gmail.com>you
> wrote:
> > Hi people.
> > I am using SRILM to build a language model.
> > But i want to use the client-server architecture that comes with SRILM.
> > I want to use SWIG to make the interface to Perl as a module and then use
> > it.
>
> Good idea!
>
> > What is the C++ or C module of the SRILM that i have to get into the
> > interface?
> > Can somebody help me?
>
> The server side is implemented in
>
> LM::probServer(unsigned port, unsigned maxClients)
>
> in lm/src/LM.cc.   The client side is in lm/src/LMClient.cc .
>
> Let me know if you need more pointers.
>
> Andreas
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.speech.sri.com/pipermail/srilm-user/attachments/20100514/7fe00555/attachment.html>


More information about the SRILM-User mailing list