'Prints out nearby words given a list of words.'

def nearby(self, words, num=20):

    ids = np.array([self._word2id.get(x, 0) for x in words])
    (vals, idx) = self._session.run([self._nearby_val, self._nearby_idx], {self._nearby_word: ids})
    for i in xrange(len(words)):
        print(('\n%s\n=====================================' % words[i]))
        for (neighbor, distance) in zip(idx[i, :num], vals[i, :num]):
            print(('%-20s    %6.4f' % (self._id2word[neighbor], distance)))
