class_docstr: Mostly borrowed from <https://github.com/clarkkev/deep-coref/blob/master/evaluation.py>
class_docstr_tok: ["Mostly","borrowed","from","<","https",":","\/\/github.com\/clarkkev\/deep-coref\/blob\/master\/evaluation.py",">"]
code: def __init__(self, metric):
      self.precision_numerator = 0
      self.precision_denominator = 0
      self.recall_numerator = 0
      self.recall_denominator = 0
      self.metric = metric
  
imports: from __future__ import division
  from __future__ import absolute_import
  from collections import Counter
  from sklearn.utils.linear_assignment_ import linear_assignment
  import numpy
  import torch
  from allennlp.training.metrics.metric import Metric
label_desc: Use image node_id 1 to create a new Scorer object from inherited base classes: object with example: obj = Scorer(metric)