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","."]
code: def __init__(self) -> None:
      self.correct_count = 0.0
      self.total_count = 0.0
  
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 1 to create a new UnigramRecall object from inherited base classes: Metric with example: obj = UnigramRecall()