Python3,word2vec,如何在我的模型中获得关于 "price" 的相似度排名列表
Python3, word2vec, How can I get the list of similarity rank about "price" in my model
在 gensim 的 word2vec python 中,我想获得 "price" 的余弦相似度列表。
我阅读了 gensim word2vec 的文档,但文档描述了 most_similar
和 n_similarity
函数)()
我想要价格和所有其他相似度的完整列表。
如果您调用 wv.most_similar('price', topn=len(wv))
,使用模型的完整词汇量的 topn
参数,您将得到每个单词与 'price'
相似度的排名列表。
如果您使用 topn=0
调用,您将获得与所有模型词的原始相似性,未排序(按照词在 wv.index2entity
中出现的顺序)。
在 gensim 的 word2vec python 中,我想获得 "price" 的余弦相似度列表。
我阅读了 gensim word2vec 的文档,但文档描述了 most_similar
和 n_similarity
函数)()
我想要价格和所有其他相似度的完整列表。
如果您调用 wv.most_similar('price', topn=len(wv))
,使用模型的完整词汇量的 topn
参数,您将得到每个单词与 'price'
相似度的排名列表。
如果您使用 topn=0
调用,您将获得与所有模型词的原始相似性,未排序(按照词在 wv.index2entity
中出现的顺序)。