title: word2vec - get nearest words
body: <p>Reading the tensorflow word2vec model output how can I output the words related to a specific word ?</p>
  
  <p>Reading the src : <a href="https://github.com/tensorflow/tensorflow/blob/r0.11/tensorflow/examples/tutorials/word2vec/word2vec_basic.py" rel="noreferrer">https://github.com/tensorflow/tensorflow/blob/r0.11/tensorflow/examples/tutorials/word2vec/word2vec_basic.py</a> can view how the image is plotted.</p>
  
  <p>But is there a data structure (e.g dictionary) created as part of training the model that allows to access nearest n words closest to given word ?
  For example if word2vec generated image :</p>
  
  <p><a href="https://i.stack.imgur.com/Bg1eg.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Bg1eg.png" alt="enter image description here"></a></p>
  
  <p>image src: <a href="https://www.tensorflow.org/versions/r0.11/tutorials/word2vec/index.html" rel="noreferrer">https://www.tensorflow.org/versions/r0.11/tutorials/word2vec/index.html</a></p>
  
  <p>In this image the words 'to , he , it' are contained in same cluster, is there a function which takes as input 'to' and outputs 'he , it' (in this case n=2) ?</p>