class_docstr: Downloads FastText Embeddings for a given language to the given path.
  Arguments:
      path(str): Local path to copy embeddings
      language(str): Embeddings language
      vocab_size(int): Size of vocabulary
  Returns:
      Returns a dictionary and reverse dictionary
      Returns a numpy array with embeddings in emb_sizexvocab_size shape
class_docstr_tok: ["Downloads","FastText","Embeddings","for","a","given","language","to","the","given","path",".","Arguments",":","path","(","str",")",":","Local","path","to","copy","embeddings","language","(","str",")",":","Embeddings","language","vocab_size","(","int",")",":","Size","of","vocabulary","Returns",":","Returns","a","dictionary","and","reverse","dictionary","Returns","a","numpy","array","with","embeddings","in","emb_sizexvocab_size","shape"]
code: def read_embeddings(self, filepath):
      word2id = {}
      word_vec = []
      with open(filepath) as emb_file:
          for i, line in enumerate(emb_file):
              # Line zero has total words, emb dimensions
              if i == 0:
                  split_line = line.split()
                  assert len(split_line) == 2
                  assert self.emb_dim == int(split_line[1])
              # Rest of line are word, word_vec format
              else:
                  word, vector = line.rstrip().split(" ", 1)
                  vector = np.fromstring(vector, sep=" ")
                  # If norm is zero fill with 0.01
                  if np.linalg.norm(vector) == 0:
                      vector[0] = 0.01
                  assert vector.shape == (self.emb_dim,), i
                  # Assign a token
                  word2id[word] = len(word2id)
                  word_vec.append(vector[None])
              # Check if your reached goal of vocab_size
              if i >= self.vocab_size:
                  break
      # Reverse dictionary
      id2word = {v: k for k, v in word2id.items()}
      # Dictionary just combines both id2word and word2id into one dict
      dico = Dictionary(id2word, word2id, self.language)
      # All word_vectors
      word_vec = np.concatenate(word_vec, 0)
      # Normalize the embeddings
      return dico, word_vec
  
file_path: nlp-architect/nlp_architect/data/fasttext_emb.py
imports: import os
  from six.moves import urllib
  import numpy
  from nlp_architect.utils.generic import license_prompt
label_desc: Use image node_id 3 for calling the FastTextEmb obj's underlying member method code with example usage: obj.read_embeddings(filepath) and returns: dico,  word_vec