class_docstr: Objects of this class realize the translation matrix which maps the source language to the target language.
  The main methods are:
  
  We map it to the other language space by computing z = Wx, then return the
  word whose representation is close to z.
  
  For details on use, see the tutorial notebook [3]_
  
  Examples
  --------
  .. sourcecode:: pycon
  
      >>> from gensim.models import KeyedVectors
      >>> from gensim.test.utils import datapath
      >>> en = datapath("EN.1-10.cbow1_wind5_hs0_neg10_size300_smpl1e-05.txt")
      >>> it = datapath("IT.1-10.cbow1_wind5_hs0_neg10_size300_smpl1e-05.txt")
      >>> model_en = KeyedVectors.load_word2vec_format(en)
      >>> model_it = KeyedVectors.load_word2vec_format(it)
      >>>
      >>> word_pairs = [
      ...     ("one", "uno"), ("two", "due"), ("three", "tre"), ("four", "quattro"), ("five", "cinque"),
      ...     ("seven", "sette"), ("eight", "otto"),
      ...     ("dog", "cane"), ("pig", "maiale"), ("fish", "cavallo"), ("birds", "uccelli"),
      ...     ("apple", "mela"), ("orange", "arancione"), ("grape", "acino"), ("banana", "banana")
      ... ]
      >>>
      >>> trans_model = TranslationMatrix(model_en, model_it)
      >>> trans_model.train(word_pairs)
      >>> trans_model.translate(["dog", "one"], topn=3)
      OrderedDict([('dog', [u'cane', u'gatto', u'cavallo']), ('one', [u'uno', u'due', u'tre'])])
  
  
  References
  ----------
  .. [3] https://github.com/RaRe-Technologies/gensim/blob/3.2.0/docs/notebooks/translation_matrix.ipynb
class_docstr_tok: ["Objects","of","this","class","realize","the","translation","matrix","which","maps","the","source","language","to","the","target","language",".","The","main","methods","are",":","We","map","it","to","the","other","language","space","by","computing","z","=","Wx",",","then","return","the","word","whose","representation","is","close","to","z",".","For","details","on","use",",","see","the","tutorial","notebook","[","3","]","_","Examples","--","--","--","--","..","sourcecode",":",":","pycon",">",">",">","from","gensim.models","import","KeyedVectors",">",">",">","from","gensim.test.utils","import","datapath",">",">",">","en","=","datapath","(","``","EN.1-10.cbow1_wind5_hs0_neg10_size300_smpl1e-05.txt","''",")",">",">",">","it","=","datapath","(","``","IT.1-10.cbow1_wind5_hs0_neg10_size300_smpl1e-05.txt","''",")",">",">",">","model_en","=","KeyedVectors.load_word2vec_format","(","en",")",">",">",">","model_it","=","KeyedVectors.load_word2vec_format","(","it",")",">",">",">",">",">",">","word_pairs","=","[","...","(","``","one","''",",","``","uno","''",")",",","(","``","two","''",",","``","due","''",")",",","(","``","three","''",",","``","tre","''",")",",","(","``","four","''",",","``","quattro","''",")",",","(","``","five","''",",","``","cinque","''",")",",","...","(","``","seven","''",",","``","sette","''",")",",","(","``","eight","''",",","``","otto","''",")",",","...","(","``","dog","''",",","``","cane","''",")",",","(","``","pig","''",",","``","maiale","''",")",",","(","``","fish","''",",","``","cavallo","''",")",",","(","``","birds","''",",","``","uccelli","''",")",",","...","(","``","apple","''",",","``","mela","''",")",",","(","``","orange","''",",","``","arancione","''",")",",","(","``","grape","''",",","``","acino","''",")",",","(","``","banana","''",",","``","banana","''",")","...","]",">",">",">",">",">",">","trans_model","=","TranslationMatrix","(","model_en",",","model_it",")",">",">",">","trans_model.train","(","word_pairs",")",">",">",">","trans_model.translate","(","[","``","dog","''",",","``","one","''","]",",","topn=3",")","OrderedDict","(","[","(","'dog","'",",","[","u'cane","'",",","u'gatto","'",",","u'cavallo","'","]",")",",","(","'one","'",",","[","u'uno","'",",","u'due","'",",","u'tre","'","]",")","]",")","References","--","--","--","--","--","..","[","3","]","https",":","\/\/github.com\/RaRe-Technologies\/gensim\/blob\/3.2.0\/docs\/notebooks\/translation_matrix.ipynb"]
docstr: Save the model to a file. Ignores (doesn't store) the `source_space` and `target_space` attributes.
docstr_tok: ["Save","the","model","to","a","file",".","Ignores","(","does","n't","store",")","the","`","source_space","`","and","`","target_space","`","attributes","."]
code: def save(self, *args, **kwargs):
      """Save the model to a file. Ignores (doesn't store) the `source_space` and `target_space` attributes."""
      kwargs["ignore"] = kwargs.get(
          "ignore", ["source_space", "target_space"]
      )
      super(TranslationMatrix, self).save(*args, **kwargs)
  
imports: import warnings
  from collections import OrderedDict
  import numpy
  from gensim import utils
label_desc: Use image node_id 3 for calling the TranslationMatrix obj's underlying member method code with example usage: obj.save() without return types