Feature classes are created at load time. Just create a feature function and keep the $n$ language models as member variables.
Kenneth On 06/10/14 13:33, Lars Bungum wrote: > Den 10. juni 2014 19:01, skrev Kenneth Heafield: >> I'm not sure what the end goal is here, but decide whether you want to >> call the feature API generically moses/LM/* or directly e.g. >> http://kheafield.com/code/kenlm/developers/, SRILM docs, IRSTLM, docs, >> ... > What I want to do is to create a feature that will score according to > either one of _n_ (say 5) LMs according to some criterion. > > I want to avoid loading the LMs inside my feature as this will obviously > take time, and want to load them all ahead of decoding, which is done > for the one configured in moses.ini in a baseline system. > > Which is why I'm trying to find out where, exactly, in the moses code > the LM is loaded. I think I found that, thanks to Hieu's post now, but > I am not yet sure how to alter the code to suit my needs. So I try to > make sure that it's not possible within the current framework to avoid > unnecessary engineering. It's kind of hard to follow the flow of the > files, where the moses.ini is read, what happens to the settings, and > what makes it invoke the Load() for one of the LMs. > > //LB _______________________________________________ Moses-support mailing list [email protected] http://mailman.mit.edu/mailman/listinfo/moses-support
