class_docstr: Evaluator class for calculating SLURP metrics
code: def compute(self, aggregate=True) -> Dict:
      scenario_results = self.scenario_f1.get_metric()
      action_results = self.action_f1.get_metric()
      intent_results = self.intent_f1.get_metric()
      entity_results = self.span_f1.get_metric()
      word_dist_results = self.distance_metrics["word"].get_metric()
      char_dist_results = self.distance_metrics["char"].get_metric()
      self.slu_f1(word_dist_results)
      self.slu_f1(char_dist_results)
      slurp_results = self.slu_f1.get_metric()
  
      if not aggregate:
          return {
              "scenario": scenario_results,
              "action": action_results,
              "intent": intent_results,
              "entity": entity_results,
              "word_dist": word_dist_results,
              "char_dist": char_dist_results,
              "slurp": slurp_results,
              "invalid": self.invalid,
              "total": self.total,
          }
  
      scores = dict()
      scores["invalid"] = self.invalid
      scores["total"] = self.total
      self.update_scores_dict(scenario_results, scores, "scenario")
      self.update_scores_dict(action_results, scores, "action")
      self.update_scores_dict(intent_results, scores, "intent")
      self.update_scores_dict(entity_results, scores, "entity")
      self.update_scores_dict(word_dist_results, scores, "word_dist")
      self.update_scores_dict(char_dist_results, scores, "char_dist")
      self.update_scores_dict(slurp_results, scores, "slurp")
  
      return scores
  
file_path: NeMo/examples/slu/speech_intent_slot/eval_utils/evaluator.py
imports: import ast
  from typing import Dict, List, Tuple, Union
  from .evaluation.metrics.metrics import ErrorMetric
label_desc: Use image node_id 4 for calling the SLURPEvaluator obj's underlying member method code with example usage: obj.compute(aggregate) and returns: scores, dict