How to calculate the sentence similarity using word2vec model of gensim with python

后端 未结 14 1295
一向
一向 2020-11-28 00:31

According to the Gensim Word2Vec, I can use the word2vec model in gensim package to calculate the similarity between 2 words.

e.g.

trained_model.simi         


        
14条回答
  •  一向
    一向 (楼主)
    2020-11-28 01:06

    You can just add the word vectors of one sentence together. Then count the Cosine similarity of two sentence vector as the similarity of two sentence. I think that's the most easy way.

提交回复
热议问题