class_docstr: Embedding class.
  
  Examples::
      >>> import matchzoo as mz
      >>> train_raw = mz.datasets.toy.load_data()
      >>> pp = mz.preprocessors.NaivePreprocessor()
      >>> train = pp.fit_transform(train_raw, verbose=0)
      >>> vocab_unit = mz.build_vocab_unit(train, verbose=0)
      >>> term_index = vocab_unit.state['term_index']
      >>> embed_path = mz.datasets.embeddings.EMBED_RANK
  
  To load from a file:
      >>> embedding = mz.embedding.load_from_file(embed_path)
      >>> matrix = embedding.build_matrix(term_index)
      >>> matrix.shape[0] == len(term_index)
      True
  
  To build your own:
      >>> data = pd.DataFrame(data=[[0, 1], [2, 3]], index=['A', 'B'])
      >>> embedding = mz.Embedding(data)
      >>> matrix = embedding.build_matrix({'A': 2, 'B': 1, '_PAD': 0})
      >>> matrix.shape == (3, 2)
      True
docstr: :return Embedding input dimension.
code: def input_dim(self) -> int:
      """:return Embedding input dimension."""
      return self._data.shape[0]
  
file_path: MatchZoo/matchzoo/embedding/embedding.py
imports: import csv
  import typing
  import numpy
  import pandas
  import matchzoo
label_desc: Use image node_id 2 for calling the Embedding obj's underlying member method code with example usage: obj.input_dim() and returns: self