docstr: :param category_embedding_resolver: CategoryEmbeddingsResolver
  :param category1: str
  :param category2: str
  :param prefix1: str
  :param prefix2: str
docstr_tok: [":","param","category_embedding_resolver",":","CategoryEmbeddingsResolver",":","param","category1",":","str",":","param","category2",":","str",":","param","prefix1",":","str",":","param","prefix2",":","str"]
code: def __init__(
      self,
      category_embedding_resolver,
      category1,
      category2,
      prefix1=None,
      prefix2=None,
  ):
      """
  
      :param category_embedding_resolver: CategoryEmbeddingsResolver
      :param category1: str
      :param category2: str
      :param prefix1: str
      :param prefix2: str
      """
      # assert issubclass(type(category_embedding_resolver), CategoryEmbeddingsResolver)
      self.category_embedding_resolver = category_embedding_resolver
      valid_categories = (
          category_embedding_resolver.corpus_.get_categories()
      )
      assert category1 in valid_categories
      assert category2 in valid_categories
      self.category1 = category1
      self.category2 = category2
      cat1_dwe_dict = category_embedding_resolver.category_embeddings_[
          category1
      ]
      cat2_dwe_dict = category_embedding_resolver.category_embeddings_[
          category2
      ]
      self.terms = np.array(
          list((set(cat1_dwe_dict.keys()) & set(cat2_dwe_dict.keys())))
      )
      self.cat1_dwe_ar = np.stack(
          [cat1_dwe_dict[word] for word in self.terms]
      )
      self.cat2_dwe_ar = np.stack(
          [cat2_dwe_dict[word] for word in self.terms]
      )
  
      # self.cat1_dwe_ar_norm, self.cat2_dwe_ar_norm, self.disparity = \
      #    scipy.spatial.procrustes(self.cat1_dwe_ar, self.cat2_dwe_ar)
      self.pairwise_sim, sv = scipy.linalg.orthogonal_procrustes(
          self.cat1_dwe_ar, self.cat2_dwe_ar
      )
  
      import pdb
  
      pdb.set_trace()
  
      # self.pairwise_sim = cosine_similarity(np.vstack([self.cat1_dwe_ar_norm,
      #                                                 self.cat2_dwe_ar_norm]))
      #
  
      self.pairwise_sim_sort = np.argsort(-self.pairwise_sim, axis=1)
  
      def distinct_prefix(x, y):
          for i, (xc, yc) in enumerate(zip(x, y)):
              if xc != yc:
                  return (x[: i + 1], y[: i + 1])
          return x, y
  
      myprefix1, myprefix2 = distinct_prefix(category1, category2)
      self.prefix1 = myprefix1 if prefix1 is None else prefix1
      self.prefix2 = myprefix2 if prefix2 is None else prefix2
  
      self.labeled_terms = np.array(
          [self.prefix1 + "_" + w for w in self.terms]
          + [self.prefix2 + "_" + w for w in self.terms]
      )
  
imports: import itertools
  import re
  import warnings
  import numpy
  import pandas
  import scipy
  from sklearn.metrics.pairwise import cosine_similarity
  from scattertext.ParsedCorpus import ParsedCorpus
  from scattertext.representations.Word2VecFromParsedCorpus import Word2VecDefault
label_desc: Use image node_id 1 to create a new EmbeddingAligner object from inherited base classes: object with example: obj = EmbeddingAligner(category_embedding_resolver, category1, category2, prefix1, prefix2)