Hieu Hoang wrote:
>
> On 22/01/2010 20:40, Christof Pintaske wrote:
>> Hello Hieu,
>>
>> I actually used the chart decoder and scripts to train the recaser and
>> consequently I used the chart decoder for the recaser decoding as well.
>>
>> It seems that the chart decoder still writes an old-style moses.ini when
>> used with the recaser training scripts, however it's not able to read them.
>>
>> In Moses::StaticData::LoadPhraseTables in StaticData.cpp:832
>>
>> string filePath= token[4];
>>
>> it expects [ttable-file] to have at least 5 entries, hardcoded. So the
>> recaser scripts are actually not usable with the chart decoder. You may
>> want to add an assertion for that in the code.
>>
>>
> -- ah. i run the training executables directly so i haven't noticed
> these problems. Afraid I'm not too hot with perl so can't fix this. If
> you manage to do it, please send me the diffs
sorry, I've hardly written 10 lines of perl in my life, I'd rather stay
away from "fixing" things there.
What I meant was to prepend the
string filePath= token[4];
in StaticData.cpp with something along the line of
if (token.size() < 5) {
fprintf(stderr,
"file \"%s\", line %d: cannot handle phrase based decoding",
__FILE__, __LINE__);
abort();
}
simply to let people know that they are off track.
>> As a side note, I saw that the chart decoder always links to libpthread,
>> regardless of --enable-threads. Is the chart decoder multithreaded? and
>> can it still be used with the irstlm language model?
>>
>>
> -- not sure why it needed pthreads, migt be to do with berkeley db.
> however, getting rid of berkeley db for yet-another-binary-format so
> will get rid of it shortly.
> -- The decoder isn't multithreaded.
> -- yes, irstlm can still be used, as well as srilm, and randlm (i think)
Thanks!
best regards
Christof
>
> _______________________________________________
> Moses-support mailing list
> [email protected]
> http://mailman.mit.edu/mailman/listinfo/moses-support
_______________________________________________
Moses-support mailing list
[email protected]
http://mailman.mit.edu/mailman/listinfo/moses-support