class_docstr: Helper container for generation version of standard metrics (F1, BLEU, ..).
class_docstr_tok: ["Helper","container","for","generation","version","of","standard","metrics","(","F1",",","BLEU",",","..",")","."]
code: def __init__(
      self,
      guess: str,
      labels: Optional[List[str]],
      prefixes: Optional[List[str]] = None,
      shared: Dict[str, Any] = None,
  ) -> None:
      super().__init__(shared=shared)
      self.prefixes = prefixes if prefixes else []
      bleu = BleuMetric.compute(guess, labels)
      f1 = F1Metric.compute(guess, labels)
      self.add_with_prefixes("nlg_bleu", bleu)
      self.add_with_prefixes("nlg_f1", f1)
  
file_path: ParlAI/parlai/core/tod/teacher_metrics.py
imports: from typing import Optional, List, Dict, Any
  from parlai.core.metrics import AverageMetric, BleuMetric, F1Metric, Metric, Metrics
label_desc: Use image node_id 1 to create a new NlgMetrics object from inherited base classes: Metrics with example: obj = NlgMetrics(guess, labels, prefixes, shared)