Downloads · 30 days
0
mingtiannihao/word2vec4cn
word2vec4cn is a machine learning model from mingtiannihao. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Downloads · 30 days
0
Access
Public
Updated Jan 12, 2024
Repo size
12.1 GB
Likes
0
Public
Click a slice to open those files.
.npy12 GB · 100%
From the Hugging Face model README
基于搜狐新闻语料训练的中文词向量模型
def loadmodel( modelPath):
new_model = gensim.models.Word2Vec.load(modelPath) # 加载
return new_model
def similar(model):
# 计算两个词的相似度
word1 = "你说"
word2 = "说"
similarity = model.wv.similarity(word1, word2)
print(f"相似度为:{similarity}")