On Tuesday 25 January 2011 11:32:47 Barry Haddow wrote:
> > So, if I want my software to use moses to translate lattices, I need to:
> >  1) implement a a class, say MyWordLattices, that inherits
> > 
> > Moses::WordLattice with a method to read lattices from memory
> > 
> >  2) feed objects of type MyWordLattice to the Manager
> >  3) look in awe as the magic happens. Am I right?
> 
> Hi Sylvain
> 
> I think you'd have to make some alterations to the WordLattice object to
> make this work - its data members are private.
> 

ah, yes. dammit. and they don't have public accessors.

> However note that the Read() method accepts an istream so you could
> serialise your lattice into a string and then pass it in as an
> istringstream. Or you could just add extra methods to WordLattice so that
> it can be built up programmatically,

I don't want to make changes to Moses source code, for the sake of 
maintainability. I really want to use it as an external library. So, with the 
above remark, the only option I'm left with is to serialise my lattice and 
pass it as an istringstream, as you said. The good news is that it probably 
means less work for me. The bad news is that I'm really not sure about 
efficiency. But I'll worry about that later.

> 
> hope that helps - regards - Barry

It does, a lot. Thank you!

-- 
Sylvain Raybaud
_______________________________________________
Moses-support mailing list
Moses-support@mit.edu
http://mailman.mit.edu/mailman/listinfo/moses-support

Reply via email to