title: How to use word embeddings for prediction in Tensorflow
body: <p>I'm trying to work through the Tensorflow tutorials and have gotten stuck trying to enhance the <a href="https://www.tensorflow.org/versions/r0.8/tutorials/recurrent/index.html" rel="nofollow">RNN/language model tutorial</a> so that I can predict the next word in a sentence. The tutorial uses word embeddings as the representation for the words.</p>
  
  <p>Since the model learns on the word embeddings, I'm assuming that any sort of prediction I add will output the same embeddings. What I can't figure out is how to convert from those embeddings back to the word ids from the dataset. The only example I have seen kept an in memory data structure with the reverse of the mapping of wordid -> embedding and used that for lookups. This obviously won't work for all problems. Is there a better way?</p>