Exemple #1
0
def test_similarity():
    similar = evaluate.most_similar(W, vocab, id2word, 'graph')
    logging.debug(similar)

    assert_equal('trees', similar[0])
Exemple #2
0
def test_similarity():
    similar = evaluate.most_similar(W, vocab, id2word, 'trees')
    print(similar)
    logger.info(similar)
Exemple #3
0
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)
Exemple #5
0
def test_similarity():
    similar = evaluate.most_similar(W, vocab, id2word, 'graph')
    logging.debug(similar)

    assert_equal('trees', similar[0])
Exemple #6
0
 def evaluate_word(W):
     words = ['good', 'movie', 'bad', 'worth', 'dog']
     for word in words:
         print evaluate.most_similar(W, vocab, id2word, word)