class_docstr: Unigram top-K recall. This does not take word order into account. Assumes
  integer labels, with each item to be classified having a single correct
  class.
class_docstr_tok: ["Unigram","top-K","recall",".","This","does","not","take","word","order","into","account",".","Assumes","integer","labels",",","with","each","item","to","be","classified","having","a","single","correct","class","."]
docstr: # Returns
  
  The accumulated recall.
docstr_tok: ["#","Returns","The","accumulated","recall","."]
code: def get_metric(self, reset: bool = False):
      """
      # Returns
  
      The accumulated recall.
      """
  
      recall = (
          self.correct_count / self.total_count
          if self.total_count > 0
          else 0
      )
      if reset:
          self.reset()
      return {"unigram_recall": recall}
  
file_path: allennlp/allennlp/training/metrics/unigram_recall.py
imports: from typing import Optional
  import sys
  import torch
  from allennlp.common.checks import ConfigurationError
  from allennlp.training.metrics.metric import Metric
  from allennlp.nn.util import dist_reduce_sum
label_desc: Use image node_id 3 for calling the UnigramRecall obj's underlying member method code with example usage: obj.get_metric(reset) and returns: dict