Method: BLEU::NgramCounts#plus_eq
- Defined in:
- lib/zipf/bleu.rb
#plus_eq(other) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/zipf/bleu.rb', line 23 def plus_eq(other) if other.n > @n then grow(other.n) end 0.upto(other.n-1) { |m| @sum[m] += other.sum[m] @clipped[m] += other.clipped[m] } @ref_len += other.ref_len @hyp_len += other.hyp_len end |