class_docstr:     The BLEU evaluation metric class.
  Parameters
  ----------
  n_grams: list[int]
      The BLEU's n_gram parameter. The results will be returned according             to the ``n_grams`` one-by-one.
  verbose: int, default = 0
      The log indicator. If set to 0, it will output no logs.
docstr:     The BLEU calculation function. It will compute the BLEU scores.
  Parameters
  ----------
  ground_truth: list[string]
      The ground truth (correct) target values. It is a list of strings.
  predict: list[string]
      The predicted target values. It is a list of strings.
  Returns
  -------
  score: list[float]
      The list contains BLEU_n results according to ``n_grams``.
  scores: list[list[float]]
      The specific results for each needed BLEU_n metric.
docstr_tok: ["The","BLEU","calculation","function",".","It","will","compute","the","BLEU","scores",".","Parameters","--","--","--","--","--","ground_truth",":","list","[","string","]","The","ground","truth","(","correct",")","target","values",".","It","is","a","list","of","strings",".","predict",":","list","[","string","]","The","predicted","target","values",".","It","is","a","list","of","strings",".","Returns","--","--","--","-","score",":","list","[","float","]","The","list","contains","BLEU_n","results","according","to","``","n_grams","``",".","scores",":","list","[","list","[","float","]","]","The","specific","results","for","each","needed","BLEU_n","metric","."]
code: def calculate_scores(self, ground_truth, predict):
      """
          The BLEU calculation function. It will compute the BLEU scores.
      Parameters
      ----------
      ground_truth: list[string]
          The ground truth (correct) target values. It is a list of strings.
      predict: list[string]
          The predicted target values. It is a list of strings.
      Returns
      -------
      score: list[float]
          The list contains BLEU_n results according to ``n_grams``.
      scores: list[list[float]]
          The specific results for each needed BLEU_n metric.
      """
      ref_list = [
          list(map(str.strip, refs)) for refs in zip(ground_truth)
      ]
  
      refs = {
          idx: strippedlines
          for (idx, strippedlines) in enumerate(ref_list)
      }
      hyps = {
          idx: [lines.strip()] for (idx, lines) in enumerate(predict)
      }
      assert len(refs) == len(hyps)
      score, scores = self.scorer.compute_score(refs, hyps)
      score_ret = [score[i - 1] for i in self.metrics]
      scores_ret = [scores[i - 1] for i in self.metrics]
      return score_ret, scores_ret
  
imports: from graph4nlp.pytorch.modules.evaluation.base import EvaluationMetricBase
  from graph4nlp.pytorch.modules.evaluation.bleu_tool.bleu import Bleu
label_desc: Use image node_id 2 for calling the BLEU obj's underlying member method code with example usage: obj.calculate_scores(ground_truth, predict) and returns: score_ret,  scores_ret