class_docstr: NER preprocessing base class
class_docstr_tok: ["NER","preprocessing","base","class"]
docstr: Loads word vectors in numpy array.
  
  Args:
      embeddings (dict or TransformerEmbedding): a dictionary of numpy array or Transformer Embedding instance
      vocab (dict): word_index lookup table.
  
  Returns:
      numpy array: an array of word embeddings.
docstr_tok: ["Loads","word","vectors","in","numpy","array",".","Args",":","embeddings","(","dict","or","TransformerEmbedding",")",":","a","dictionary","of","numpy","array","or","Transformer","Embedding","instance","vocab","(","dict",")",":","word_index","lookup","table",".","Returns",":","numpy","array",":","an","array","of","word","embeddings","."]
code: def filter_embeddings(self, embeddings, vocab, dim):
      """Loads word vectors in numpy array.
  
      Args:
          embeddings (dict or TransformerEmbedding): a dictionary of numpy array or Transformer Embedding instance
          vocab (dict): word_index lookup table.
  
      Returns:
          numpy array: an array of word embeddings.
      """
      if not isinstance(embeddings, dict):
          return
      _embeddings = np.zeros([len(vocab), dim])
      for word in vocab:
          if word in embeddings:
              word_idx = vocab[word]
              _embeddings[word_idx] = embeddings[word]
      return _embeddings
  
imports: from ...None import utils
  from ...imports import *
  from ...preprocessor import Preprocessor
  from ..None import preprocessor
  from ..None import textutils
label_desc: Use image node_id 4 for calling the NERPreprocessor obj's underlying member method code with example usage: obj.filter_embeddings(embeddings, vocab, dim) and returns: _embeddings