docs: def bleu(eval_data, predictions, scores='ignored', learner='ignored'):
      '''
      Return corpus-level BLEU score of `predictions` using the `output`
      field of the instances in `eval_data` as references. This is returned
      as a length-1 list of floats.
  
      This uses the NLTK unsmoothed implementation, which has been known
      to have some bugs. This function patches over the biggest bug, which
      is that NLTK ignores n-gram overlap counts of 0 (this should result
      in a zero BLEU score).
  
      >>> data = [Instance('input', 'this is the good'),
      ...         Instance('input', 'the bad'),
      ...         Instance('input', 'and the ugly')]
      >>> bleu(data, ['this is the good', 'the good', 'seriously really good'])  # doctest: +ELLIPSIS
      [0.65599...]
      >>> np.exp(np.mean([np.log(5. / 9.), np.log(3. / 6.),
      ...                 np.log(2. / 3.), np.log(1. / 1.)]))  # doctest: +ELLIPSIS
      0.65599...
      '''
      ref_groups = ([inst.output.split()]
                    if isinstance(inst.output, basestring) else
                    [_maybe_tokenize(r) for r in inst.output]
                    for inst in eval_data)
      return [corpus_bleu(ref_groups, [p.split() for p in predictions])]