docstr: Try to find if mentions has anyone or more of the relations this class support
  
  Args:
      mention_x: MentionDataLight
      mention_y: MentionDataLight
  
  Returns:
      Set[RelationType]: One or more of: RelationType.WIKIPEDIA_BE_COMP,
          RelationType.WIKIPEDIA_TITLE_PARENTHESIS,
          RelationType.WIKIPEDIA_DISAMBIGUATION, RelationType.WIKIPEDIA_CATEGORY,
          RelationType.WIKIPEDIA_REDIRECT_LINK, RelationType.WIKIPEDIA_ALIASES,
          RelationType.WIKIPEDIA_PART_OF_SAME_NAME
docstr_tok: ["Try","to","find","if","mentions","has","anyone","or","more","of","the","relations","this","class","support","Args",":","mention_x",":","MentionDataLight","mention_y",":","MentionDataLight","Returns",":","Set","[","RelationType","]",":","One","or","more","of",":","RelationType.WIKIPEDIA_BE_COMP",",","RelationType.WIKIPEDIA_TITLE_PARENTHESIS",",","RelationType.WIKIPEDIA_DISAMBIGUATION",",","RelationType.WIKIPEDIA_CATEGORY",",","RelationType.WIKIPEDIA_REDIRECT_LINK",",","RelationType.WIKIPEDIA_ALIASES",",","RelationType.WIKIPEDIA_PART_OF_SAME_NAME"]
code: def extract_all_relations(
      self, mention_x: MentionDataLight, mention_y: MentionDataLight
  ) -> Set[RelationType]:
      """
      Try to find if mentions has anyone or more of the relations this class support
  
      Args:
          mention_x: MentionDataLight
          mention_y: MentionDataLight
  
      Returns:
          Set[RelationType]: One or more of: RelationType.WIKIPEDIA_BE_COMP,
              RelationType.WIKIPEDIA_TITLE_PARENTHESIS,
              RelationType.WIKIPEDIA_DISAMBIGUATION, RelationType.WIKIPEDIA_CATEGORY,
              RelationType.WIKIPEDIA_REDIRECT_LINK, RelationType.WIKIPEDIA_ALIASES,
              RelationType.WIKIPEDIA_PART_OF_SAME_NAME
      """
      relations = set()
      mention1_str = mention_x.tokens_str.strip()
      mention2_str = mention_y.tokens_str.strip()
  
      if self.filter_pronouns:
          if self.is_both_opposite_personal_pronouns(
              mention1_str, mention2_str
          ):
              relations.add(RelationType.NO_RELATION_FOUND)
              return relations
  
      if self.filter_time_data:
          if self.is_both_data_or_time(mention_x, mention_y):
              relations.add(RelationType.NO_RELATION_FOUND)
              return relations
  
      pages1 = self.get_phrase_related_pages(mention1_str)
      pages2 = self.get_phrase_related_pages(mention2_str)
  
      # check if search phrase is empty meaning it is probably a stop word
      if pages1.is_empty_norm_phrase or pages2.is_empty_norm_phrase:
          relations.add(RelationType.NO_RELATION_FOUND)
          return relations
  
      if self.is_redirect_same(pages1, pages2):
          relations.add(RelationType.WIKIPEDIA_REDIRECT_LINK)
  
      titles1 = pages1.get_and_set_titles()
      titles1.add(mention1_str + " " + mention2_str)
      titles1.add(mention2_str + " " + mention1_str)
  
      titles2 = pages2.get_and_set_titles()
      titles2.add(mention1_str + " " + mention2_str)
      titles2.add(mention2_str + " " + mention1_str)
  
      relation_alias = self.extract_aliases(
          pages1, pages2, titles1, titles2
      )
      if relation_alias is not RelationType.NO_RELATION_FOUND:
          relations.add(relation_alias)
      relation_dis = self.extract_disambig(
          pages1, pages2, titles1, titles2
      )
      if relation_dis is not RelationType.NO_RELATION_FOUND:
          relations.add(relation_dis)
      relation_cat = self.extract_category(
          pages1, pages2, titles1, titles2
      )
      if relation_cat is not RelationType.NO_RELATION_FOUND:
          relations.add(relation_cat)
      relation_par = self.extract_parenthesis(
          pages1, pages2, titles1, titles2
      )
      if relation_par is not RelationType.NO_RELATION_FOUND:
          relations.add(relation_par)
      relation_be = self.extract_be_comp(
          pages1, pages2, titles1, titles2
      )
      if relation_be is not RelationType.NO_RELATION_FOUND:
          relations.add(relation_be)
  
      if len(relations) == 0:
          relations.add(RelationType.NO_RELATION_FOUND)
  
      return relations
  
imports: from __future__ import division
  import logging
  import os
  from typing import Set, List
  from nlp_architect.common.cdc.mention_data import MentionDataLight
  from nlp_architect.data.cdc_resources.data_types.wiki.wikipedia_pages import WikipediaPages
  from nlp_architect.data.cdc_resources.relations.relation_extraction import RelationExtraction
  from nlp_architect.data.cdc_resources.relations.relation_types_enums import RelationType, WikipediaSearchMethod
  from nlp_architect.data.cdc_resources.wikipedia.wiki_elastic import WikiElastic
  from nlp_architect.data.cdc_resources.wikipedia.wiki_offline import WikiOffline
  from nlp_architect.data.cdc_resources.wikipedia.wiki_online import WikiOnline
  from nlp_architect.utils.string_utils import StringUtils
label_desc: Use image node_id 3 for calling the WikipediaRelationExtraction obj's underlying member method code with example usage: obj.extract_all_relations(mention_x, mention_y) and returns: relations, relations, relations, relations