On 02/23/11 17:02, Barry Haddow wrote:
>  
>> There's a question of location: for my purposes this should be linked
>> into kenlm/build_binary, kenlm/query, moses-cmd/src/moses, etc.  I see
>> the mert implementation and lmserver also throw exceptions, so it should
>> probably be linked in there as well.  Where would you suggest it be
>> placed?
>>
> 
> Does it need to be linked in, or can you just #include the handler in the 
> main 
> method file? Not really sure where to put the code in that case, but 
> moses/src 
> is probably fine, even though it's not to be included in libmoses. I sense a 
> code reorganisation is long overdue...
> 

Either way will work, though it is a bit weird to #include non-inline
function definitions.  If you link, then you'll only modify the
Makefile.am and not touch the cc file at all.  Though I suppose there
are just as many Makefile rules as there are main programs.

It's also unfortunately cyclic to have kenlm code depend on moses/src
and have moses/src depend on kenlm. . . similar for e.g. mert needing
the moses directory to compile.

Agree with your point about reorganisation but am not volunteering :-).

On a mostly unrelated point, have you considered making the default
compilation use -g1 and linking with -lSegFault ?  That way, if Moses
segfaults (and it does during development), you'll get a stack trace
even on optimized code.  If you're worried about -lSegFault not being
present on some systems, ./configure can do a linker test then add to
LDFLAGS if present.

Kenneth
_______________________________________________
Moses-support mailing list
[email protected]
http://mailman.mit.edu/mailman/listinfo/moses-support

Reply via email to