docstr: Load terms and Y labels from feature file.
  
  Args:
      filename: feature table file full path
  
  Returns:
      x: feature vector
      y: labels vector
      terms: candidate terms
      polarities: opinion polarity per term
code: def load_terms_and_y_labels(filename):
      """Load terms and Y labels from feature file.
  
      Args:
          filename: feature table file full path
  
      Returns:
          x: feature vector
          y: labels vector
          terms: candidate terms
          polarities: opinion polarity per term
      """
      print("Loading basic features from {} ...".format(filename))
  
      table = np.genfromtxt(
          filename, delimiter=",", skip_header=1, dtype=str
      )
      if table.size == 0:
          raise ValueError(
              "Error: Terms file is empty, no terms to re-rank."
          )
  
      try:
          terms = table[:, 1]
      except Exception as e:
          print(
              "\n\nError converting str to float in training table: {}".format(
                  e
              )
          )
  
      y = table[:, 0].astype(int)
      polarities = None
  
      print(str(terms.shape[0]) + " features loaded from CSV file")
      return y, terms, polarities
  
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 5 for calling the RerankTerms obj's underlying member method code with example usage: obj.load_terms_and_y_labels(filename) and returns: y,  terms,  polarities