我试图通过输入单词列表并输出一个单词来计算语义相似度,该单词是列表中相似度最高的单词。
例如
如果我传递一个单词列表
words = ['portugal', 'spain', 'belgium', 'country', 'netherlands', 'italy']
它应该输出类似这样的东西-
['country']
python nlp cosine-similarity word2vec bert-language-model
bert-language-model ×1
cosine-similarity ×1
nlp ×1
python ×1
word2vec ×1