class_docstr: Calculate BLEU for ST and MT models during training.
  
  :param y_hats: numpy array with predicted text
  :param y_pads: numpy array with true (target) text
  :param char_list: vocabulary list
  :param sym_space: space symbol
  :param sym_pad: pad symbol
  :param report_bleu: report BLUE score if True
docstr: Calculate corpus-level BLEU score.
  
  :param torch.Tensor ys_hat: prediction (batch, seqlen)
  :param torch.Tensor ys_pad: reference (batch, seqlen)
  :return: corpus-level BLEU score in a mini-batch
  :rtype float
code: def __call__(self, ys_hat, ys_pad, is_ctc=False):
      """Calculate corpus-level BLEU score.
  
      :param torch.Tensor ys_hat: prediction (batch, seqlen)
      :param torch.Tensor ys_pad: reference (batch, seqlen)
      :return: corpus-level BLEU score in a mini-batch
      :rtype float
      """
      bleu = None
      if is_ctc:
          return self.calculate_bleu_ctc(ys_hat, ys_pad)
      elif not self.report_bleu:
          return bleu
  
      bleu = self.calculate_corpus_bleu(ys_hat, ys_pad)
      return bleu
  
file_path: espnet/espnet/nets/e2e_mt_common.py
imports: from itertools import groupby
  import nltk
  import numpy
label_desc: Use image node_id 2 for calling the ErrorCalculator obj's underlying member method code with example usage: obj.__call__(ys_hat, ys_pad, is_ctc) and returns: bleu, self, bleu