Reputation: 735
I have some training sentences generally of warning nature. Now my goal is to predict weather incoming sentence is a warning message or not. I have gone through Sentiment Analysis Using Doc2Vec but according to my understanding it have not considered newly arriving sentence to predict if its positive or negative.
According to my experience I found that the output vector in gensim.doc2vec
for each sentence is dependent on other sentences as well, which means we can not directly use the model to generate vector for newly arriving sentence. Please anyone help me with this. Thanks.
Upvotes: 1
Views: 1476
Reputation: 91
One way to generate new vectors is using the infer_vector() function, which will generate a new vector based on a trained model. Since the model is frozen when you use this function, the new vector will be based on the existing sentence vectors, but not change them.
Upvotes: 4