docstr: calculate similarity scores between each term and each off the generic terms
  
  Args:
      terms: candidate terms
      generic_terms: generic opinion terms
      embedding_dict: embedding dictionary
  
  Returns:
      neg_all: similarity scores between each cand term and neg generic term
      pos_all: similarity scores between each cand term and pos generic term
code: def calc_similarity_scores_for_all_terms(
      self, terms, generic_terms, embedding_dict
  ):
      """
      calculate similarity scores between each term and each off the generic terms
  
      Args:
          terms: candidate terms
          generic_terms: generic opinion terms
          embedding_dict: embedding dictionary
  
      Returns:
          neg_all: similarity scores between each cand term and neg generic term
          pos_all: similarity scores between each cand term and pos generic term
  
      """
      print("\nComputing similarity scores...\n")
  
      neg_all = []
      pos_all = []
  
      for term in terms:
          polarity_sim_dic = {"NEG": [], "POS": []}
          for generic_term, polarity in generic_terms.items():
              sim_score = self.calc_cosine_similarity(
                  term, generic_term, embedding_dict
              )
  
              if sim_score is not None:
                  polarity_sim_dic[polarity].append(sim_score)
              else:
                  polarity_sim_dic[polarity].append(float(0))
  
          neg_all.append(polarity_sim_dic["NEG"])
          pos_all.append(polarity_sim_dic["POS"])
  
      return neg_all, pos_all
  
imports: import csv
  import pickle
  import numpy
  import tensorflow
  from os import PathLike
  from pathlib import Path
  from nlp_architect.models.absa.utils import _read_generic_lex_for_similarity
  from nlp_architect.models.absa import TRAIN_OUT, TRAIN_LEXICONS, GENERIC_OP_LEX, LEXICONS_OUT
  from scipy.spatial.distance import cosine
  from sklearn.model_selection import StratifiedKFold
  from tensorflow.keras.layers import Dense, Dropout
  from tensorflow.keras.models import Sequential, load_model
  from nlp_architect.utils.embedding import load_word_embeddings
label_desc: Use image node_id 3 for calling the RerankTerms obj's underlying member method code with example usage: obj.calc_similarity_scores_for_all_terms(terms, generic_terms, embedding_dict) and returns: neg_all,  pos_all