class_docstr: Computes labeled and unlabeled attachment scores for a
  dependency parse, as well as sentence level exact match
  for both labeled and unlabeled trees. Note that the input
  to this metric is the sampled predictions, not the distribution
  itself.
  
  # Parameters
  
  ignore_classes : `List[int]`, optional (default = `None`)
      A list of label ids to ignore when computing metrics.
docstr: # Returns
  
  The accumulated metrics as a dictionary.
code: def get_metric(
      self,
      reset: bool = False,
  ):
      """
      # Returns
  
      The accumulated metrics as a dictionary.
      """
      unlabeled_attachment_score = 0.0
      labeled_attachment_score = 0.0
      unlabeled_exact_match = 0.0
      labeled_exact_match = 0.0
  
      if self._total_words > 0.0:
          unlabeled_attachment_score = float(
              self._unlabeled_correct
          ) / float(self._total_words)
          labeled_attachment_score = float(
              self._labeled_correct
          ) / float(self._total_words)
      if self._total_sentences > 0:
          unlabeled_exact_match = float(
              self._exact_unlabeled_correct
          ) / float(self._total_sentences)
          labeled_exact_match = float(
              self._exact_labeled_correct
          ) / float(self._total_sentences)
      if reset:
          self.reset()
      metrics = {
          "UAS": unlabeled_attachment_score,
          "LAS": labeled_attachment_score,
          "UEM": unlabeled_exact_match,
          "LEM": labeled_exact_match,
      }
      return metrics
  
file_path: allennlp/allennlp/training/metrics/attachment_scores.py
imports: from typing import Optional, List
  import torch
  from allennlp.nn.util import dist_reduce_sum
  from allennlp.training.metrics.metric import Metric
label_desc: Use image node_id 3 for calling the AttachmentScores obj's underlying member method code with example usage: obj.get_metric(reset) and returns: metrics