jupyter笔记本显示无类型值但IDLE没有

时间:2017-06-24 05:33:21

标签: python nltk jupyter-notebook python-idle

max_sim = -1.0
best_pair = None, None
for synset_1 in synsets_1:
    for synset_2 in synsets_2:
        sim = wn.path_similarity(synset_1, synset_2)
        print (sim)
        if sim > max_sim:
            max_sim = sim
            best_pair = synset_1, synset_2

通过使用nltk包,代码是余弦相似性,我能够执行并查看IDLE中的输出。但是在jupyter笔记本电脑中' sim'正在展示一些“无”#39;值

0 个答案:

没有答案