code: def load_glove(file):
      
      model = {}
      with open(file, encoding="utf8", errors='ignore') as f:
          for line in f:
              line = line.split(' ')
              word = line[0]
              vector = np.array([float(val) for val in line[1:]])
              model[word] = vector
  
      return model
docs: Loads GloVe vectors in numpy array.
  
      Args:
          file (str): a path to a glove file.
  
      Return:
          dict: a dict of numpy arrays.