class_docstr: Main coreference resolution algorithm
code: def __init__(
      self,
      nlp=None,
      greedyness=0.5,
      max_dist=50,
      max_dist_match=500,
      conll=None,
      blacklist=True,
      debug=False,
  ):
      self.greedyness = greedyness
      self.max_dist = max_dist
      self.max_dist_match = max_dist_match
      self.debug = debug
      model_path = os.path.join(
          PACKAGE_DIRECTORY,
          "weights/conll/" if conll is not None else "weights/",
      )
      model_path = os.path.join(PACKAGE_DIRECTORY, "weights/")
      print("Loading neuralcoref model from", model_path)
      self.coref_model = Model(model_path)
      if nlp is None:
          print("Loading spacy model")
          try:
              spacy.info("en_core_web_sm")
              model = "en_core_web_sm"
          except IOError:
              print(
                  "No spacy 2 model detected, using spacy1 'en' model"
              )
              spacy.info("en")
              model = "en"
          nlp = spacy.load(model)
      self.data = Document(
          nlp, conll=conll, blacklist=blacklist, model_path=model_path
      )
      self.clusters = {}
      self.mention_to_cluster = []
      self.mentions_single_scores = {}
      self.mentions_pairs_scores = {}
  
imports: import os
  import spacy
  import numpy
  from neuralcoref.train.utils import PACKAGE_DIRECTORY, SIZE_SINGLE_IN
  from neuralcoref.train.compat import unicode_
  from neuralcoref.train.document import Document, MENTION_TYPE, NO_COREF_LIST
label_desc: Use image node_id 1 to create a new Coref object from inherited base classes: object with example: obj = Coref(nlp, greedyness, max_dist, max_dist_match, conll, blacklist, debug)