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!
Thanks for creating and maintaining this useful tool!
I'd like to report a bug in the following lines:
fast_align.cc#L261~L264.fast_align/src/fast_align.cc
Line 264 in 7c2bbca
When
src.size()is zero,infis added to*tot_len_ratio. This, in turn, setsmean_srclen_multipliertoinf(fast_align.cc#L291), and subsequentlylog_probtoinf.I think this can be avoided by adding a
continue;statement whensrc.size()is zero.Hope this helps!