Reputation: 51
I already trained a word2vec model with gensim library. For example, my model contains vectors for 2 words: "new" and "york". However, I also want to train a vector for the word "new york", so I transform "new york" into "new_york" and train a new vector model. Finally, I want to combine 3 vectors: vector of the word "new", "york" and "new_york" into one vector representation for the word "new york".
How can I save the new vector value to the model?
I try to assign the new vector to the model but gensim did not allow to assign the new value for vector model.
Upvotes: 1
Views: 161
Reputation: 54153
Word-vectors are generally only comparable to each other if they were trained together.
So, if you want to have vectors for all of 'new', 'york', and 'new_york', you should prepare a corpus which includes them all, in a variety of uses, and train a Word2Vec
model from that.
Upvotes: 1