[SRILM User List] a question about FLMs and SRILM

Andreas Stolcke stolcke at speech.sri.com
Fri Aug 21 10:45:03 PDT 2009


Josep Maria Crego wrote:
> dear Andreas,
>
> My name is Josep M. Crego, a post-doc working on SMT at LIMSI-CNRS 
> (France)
>
> I am trying to use the factored LM library classes (version 1.5.8) 
> directly in my code. Mainly, I would like to use an flm function 
> equivalent to /*wordProb(ixWord, history)*/ for standard lm's of srilm.
>
> So, my question is: does it exist for FLM's a function equivalent to 
> /*wordProb(ixWord, history)*/ where ixWord and history consist of a 
> vector of factors??? it would be perfect if you could send me an 
> example of code employing ngram probabilities from a sequence of 
> factors (Ex: W-wrd1:T-pos1 W-wrd2:T-pos2 ... W-wrdN:T-posN) according 
> to a FLM description file.
There is a wordProb function for FLMs, since FLMs are just a special 
kind of LM class.
You need create an LM object of class ProductNgram and then invoke the 
wordProb function in it.
Look in lm/src/ngram.cc for an example (look in the places where the 
variable "factored" is used).

>
> thanks in advance,
> jm
>
> PS: sorry for sending directly the question to you... I don't know why 
> I couldn't use the srilm mailing list
There were problems with the mailing list admin software.  We solved 
those and there is now an easy way to join/leave the list.  Just go to 
http://www.speech.sri.com/mailman/listinfo/srilm-user/ and follow the 
instructions there.

Andreas

>
> -- 
> Josep-Maria Crego
> LIMSI-CNRS
> Phone: +33/0 1 69 85 80 68
> Postmail: BP 133, 91403 Orsay (France) 



More information about the SRILM-User mailing list