Thanks for creating and maintaining this useful tool!
I'd like to report a bug in the following lines: fast_align.cc#L261~L264.
|
*tot_len_ratio += static_cast<double>(trg.size()) / static_cast<double>(src.size()); |
When
src.size() is zero,
inf is added to
*tot_len_ratio. This, in turn, sets
mean_srclen_multiplier to
inf (
fast_align.cc#L291), and subsequently
log_prob to
inf.
I think this can be avoided by adding a continue; statement when src.size() is zero.
Hope this helps!