class_docstr: A mention (possible anaphor) inherite from spacy Span class with additional informations
docstr: Does the root of the Mention match the root of another Mention/Span
docstr_tok: ["Does","the","root","of","the","Mention","match","the","root","of","another","Mention\/Span"]
code: def heads_agree(self, mention2):
      """Does the root of the Mention match the root of another Mention/Span"""
      # we allow same-type NEs to not match perfectly,
      # but rather one could be included in the other, e.g., "George" -> "George Bush"
      if (
          self.in_entities
          and mention2.in_entities
          and self.entity_label == mention2.entity_label
          and (
              self.root.lower_ in mention2.lower_
              or mention2.root.lower_ in self.lower_
          )
      ):
          return True
      return self.root.lower_ == mention2.root.lower_
  
imports: import re
  import io
  from six import string_types, integer_types
  from spacy.tokens import Span, Token
  from neuralcoref.train.compat import unicode_
  from neuralcoref.train.utils import encode_distance, parallel_process
  import spacy
  import numpy
label_desc: Use image node_id 9 for calling the Mention obj's underlying member method code with example usage: obj.heads_agree(mention2) and returns: unknown, True