1
私はWord2Vecモデルを訓練するためにgensimを使用しました。近くの用語をクエリしたいと思います。しかし、だけではなく、すべての方向に最も近い言葉取得する:特定の方向のWord2Vecベクトル空間に移動
nearest = nearest_by_vector(word, direction_vector)
:
model = models.Word2Vec.load('MyModel') # load up my trained model
nearest = model.most_similar(['mushroom']) # nearby words all around
を私はベクトル空間内の特定の方向と距離に移動して、本質的に最も近い単語を検索したいです私のベクトルの数学はひどい(つまり、存在しない)、特に私のモデルでは非常に多くの次元がある。