docstr:     The standard rouge calculation function for summerization. It will compute                 the rouge scores using pyrouge tools.
      Note that each instance in ``ground_truth`` or ``predict`` is a list of sentences.
  Parameters
  ----------
  ground_truth: list[list[string]]
      The ground truth (correct) target values. It is a list of lists.
  predict: list[list[string]]
      The predicted target values. It is a list of lists.
  Returns
  -------
  score: float
      The final bleu score
docstr_tok: ["The","standard","rouge","calculation","function","for","summerization",".","It","will","compute","the","rouge","scores","using","pyrouge","tools",".","Note","that","each","instance","in","``","ground_truth","``","or","``","predict","``","is","a","list","of","sentences",".","Parameters","--","--","--","--","--","ground_truth",":","list","[","list","[","string","]","]","The","ground","truth","(","correct",")","target","values",".","It","is","a","list","of","lists",".","predict",":","list","[","list","[","string","]","]","The","predicted","target","values",".","It","is","a","list","of","lists",".","Returns","--","--","--","-","score",":","float","The","final","bleu","score"]
code: def calculate_scores(self, ground_truth, predict):
      """
              The standard rouge calculation function for summerization. It will compute \
                  the rouge scores using pyrouge tools.
              Note that each instance in ``ground_truth`` or ``predict`` is a list of sentences.
          Parameters
          ----------
          ground_truth: list[list[string]]
              The ground truth (correct) target values. It is a list of lists.
          predict: list[list[string]]
              The predicted target values. It is a list of lists.
          Returns
          -------
          score: float
              The final bleu score
          """
      if os.path.exists("pred"):
          shutil.rmtree("pred")
      if os.path.exists("gt"):
          shutil.rmtree("gt")
      os.makedirs("pred", exist_ok=False)
      os.makedirs("gt", exist_ok=False)
      cnt = 0
      for g, p in zip(ground_truth, predict):
          self.dump_tmp(g, os.path.join("gt", str(cnt) + ".txt"))
          self.dump_tmp(p, os.path.join("pred", str(cnt) + ".txt"))
          cnt += 1
      self.rouge.model_filename_pattern = "#ID#.txt"
      self.rouge.system_filename_pattern = r"(\d+).txt"
      self.rouge.model_dir = "pred"
      self.rouge.system_dir = "gt"
      rouge_results = self.rouge.convert_and_evaluate()
      dic = self.rouge.output_to_dict(rouge_results)
      return dic
  
file_path: graph4nlp/graph4nlp/pytorch/modules/evaluation/rouge_summarization.py
imports: import os
  import re
  import shutil
  from graph4nlp.pytorch.modules.evaluation.base import EvaluationMetricBase
  import pyrouge
label_desc: Use image node_id 2 for calling the SummarizationRouge obj's underlying member method code with example usage: obj.calculate_scores(ground_truth, predict) and returns: dic