1
我已使用gensim来训练Word2Vec模型,并且想要查询附近的术语。但不是刚开最接近于各个方向的话:在Word2Vec中沿特定方向移动向量空间
model = models.Word2Vec.load('MyModel') # load up my trained model
nearest = model.most_similar(['mushroom']) # nearby words all around
我想在矢量空间中的特定方向和移动的距离和检索最近的字,主要有:
nearest = nearest_by_vector(word, direction_vector)
我的矢量数学是可怕的(即不存在),尤其是在我的模型中有这么多维度。