docstr: Check if input mentions has referent dictionary relation between them
  
  Args:
      mention_x: MentionDataLight
      mention_y: MentionDataLight
  
  Returns:
      bool
docstr_tok: ["Check","if","input","mentions","has","referent","dictionary","relation","between","them","Args",":","mention_x",":","MentionDataLight","mention_y",":","MentionDataLight","Returns",":","bool"]
code: def is_referent_dict(
      self, mention_x: MentionDataLight, mention_y: MentionDataLight
  ) -> bool:
      """
      Check if input mentions has referent dictionary relation between them
  
      Args:
          mention_x: MentionDataLight
          mention_y: MentionDataLight
  
      Returns:
          bool
      """
      match_result = False
      x_head = mention_x.mention_head
      y_head = mention_y.mention_head
      x_head_lemma = mention_x.mention_head_lemma
      y_head_lemma = mention_y.mention_head_lemma
  
      if (
          x_head in self.ref_dict and y_head in self.ref_dict[x_head]
      ) or (
          y_head in self.ref_dict and x_head in self.ref_dict[y_head]
      ):
          match_result = True
      if (
          x_head_lemma in self.ref_dict
          and y_head_lemma in self.ref_dict[x_head_lemma]
      ) or (
          y_head_lemma in self.ref_dict
          and x_head_lemma in self.ref_dict[y_head_lemma]
      ):
          match_result = True
      if (
          x_head_lemma in self.ref_dict
          and y_head in self.ref_dict[x_head_lemma]
      ) or (
          y_head_lemma in self.ref_dict
          and x_head in self.ref_dict[y_head_lemma]
      ):
          match_result = True
      if (
          y_head in self.ref_dict
          and x_head_lemma in self.ref_dict[y_head]
      ) or (
          x_head in self.ref_dict
          and y_head_lemma in self.ref_dict[x_head]
      ):
          match_result = True
  
      return match_result
  
file_path: nlp-architect/nlp_architect/data/cdc_resources/relations/referent_dict_relation_extraction.py
imports: import logging
  import os
  from typing import Dict, List, Set
  from nlp_architect.common.cdc.mention_data import MentionDataLight
  from nlp_architect.data.cdc_resources.relations.relation_extraction import RelationExtraction
  from nlp_architect.data.cdc_resources.relations.relation_types_enums import OnlineOROfflineMethod, RelationType
  from nlp_architect.utils.io import load_json_file
  from nlp_architect.utils.string_utils import StringUtils
label_desc: Use image node_id 4 for calling the ReferentDictRelationExtraction obj's underlying member method code with example usage: obj.is_referent_dict(mention_x, mention_y) and returns: match_result