docstr: get metrics result
  
  Args:
      generate_corpus: the generated corpus
      reference_dataset: the referenced dataset
      avg: whether or not to average the metric results
  
  Returns:
      dict: such as ``{'bleu-1': xxx, 'bleu-2': yyy}``
code: def evaluate(self, generate_corpus, reference_dataset, avg=True):
      r"""get metrics result
  
      Args:
          generate_corpus: the generated corpus
          reference_dataset: the referenced dataset
          avg: whether or not to average the metric results
  
      Returns:
          dict: such as ``{'bleu-1': xxx, 'bleu-2': yyy}``
      """
      generate_corpus, reference_corpus = self._process_corpus(
          generate_corpus, reference_dataset
      )
  
      result_dict = {}
      for evaluator in self.evaluators:
          metric_result = evaluator.evaluate(
              generate_corpus, reference_corpus, avg=avg
          )
          result_dict.update(metric_result)
      if "hm" in self.metrics:
          result_dict["hm"] = 2 / (
              1 / result_dict["bleu"] + 1 / result_dict["style"]
          )
      return result_dict
  
file_path: TextBox/textbox/evaluator/base_evaluator.py
imports: from nltk.tokenize import word_tokenize
label_desc: Use image node_id 3 for calling the BaseEvaluator obj's underlying member method code with example usage: obj.evaluate(generate_corpus, reference_dataset, avg) and returns: result_dict