def test_similarity(): similar = evaluate.most_similar(W, vocab, id2word, 'graph') logging.debug(similar) assert_equal('trees', similar[0])
def test_similarity(): similar = evaluate.most_similar(W, vocab, id2word, 'trees') print(similar) logger.info(similar)
def test_similarity(): similar = evaluate.most_similar(W, vocab, id2word, 'money') logging.debug(similar) print similar
def evaluate_word(W): words = ['good', 'movie', 'bad', 'worth', 'dog'] for word in words: print evaluate.most_similar(W, vocab, id2word, word)