4
如何衡量单词的语义相似性?
找出单词语义相似性的最佳方法是什么?Word2Vec可以,但不理想: # Using the 840B word Common Crawl GloVe vectors with gensim: # 'hot' is closer to 'cold' than 'warm' In [7]: model.similarity('hot', 'cold') Out[7]: 0.59720456121072973 In [8]: model.similarity('hot', 'warm') Out[8]: 0.56784095376659627 # Cold is much closer to 'hot' than 'popular' In [9]: model.similarity('hot', 'popular') Out[9]: 0.33708479049537632 NLTK的Wordnet方法似乎只是放弃: In [25]: …