class_docstr: Compute words embedding features for mentions
code: def load_embeddings_from_file(name):
      print("Loading embeddings from", name)
      embeddings = {}
      voc_to_idx = {}
      idx_to_voc = []
      mat = np.load(name + "_embeddings.npy")
      average_mean = np.average(
          mat, axis=0, weights=np.sum(mat, axis=1)
      )
      with io.open(
          name + "_vocabulary.txt", "r", encoding="utf-8"
      ) as f:
          for i, line in enumerate(f):
              embeddings[line.strip()] = mat[i, :]
              voc_to_idx[line.strip()] = i
              idx_to_voc.append(line.strip())
      return average_mean, embeddings, voc_to_idx, idx_to_voc
  
imports: import re
  import io
  from six import string_types, integer_types
  from spacy.tokens import Span, Token
  from neuralcoref.train.compat import unicode_
  from neuralcoref.train.utils import encode_distance, parallel_process
  import spacy
  import numpy
label_desc: Use image node_id 2 for calling the EmbeddingExtractor obj's underlying member method code with example usage: obj.load_embeddings_from_file(name) and returns: average_mean,  embeddings,  voc_to_idx,  idx_to_voc