bleu.doctest 296 B

123456789101112131415
  1. ==========
  2. BLEU tests
  3. ==========
  4. >>> from nltk.translate import bleu
  5. If the candidate has no alignment to any of the references, the BLEU score is 0.
  6. >>> bleu(
  7. ... ['The candidate has no alignment to any of the references'.split()],
  8. ... 'John loves Mary'.split(),
  9. ... [1],
  10. ... )
  11. 0