简体   繁体   中英

How do I use the word2vec model that I trained?

I am trying to make a basic sentiment analysis program. Right now, I have a trained and saved word2vec model from a database of tweets, similarly to the example provided in https://www.kaggle.com/code/stoicstatic/twitter-sentiment-analysis-using-word2vec-bilstm/notebook .

What I was wondering was how I could use the model that I have trained and apply it to other data outside of the training data. My end goal was to be able to assign values such as -1 = negative, 0 = neutral, and 1 = positive to different texts.

Any help would be greatly appreciated. Thank you!

There's no practical way to tutor you through that broad goal as a answer here.

If you follow the notebook you've linked exactly, with either its data or your very-similar data/goals, does it work? If not, you could potentially ask more specific question based on the exact places where things break, or fail to meet expectations. But until you've done that, it's impossible to know what programming details to say to you to help.

Also, starting out, you may want to begin with searching for, and working through, some more-basic test-classification/sentiment-analysis tutorials in Python that don't use word2vec or deeper neural-networks like BiLSTM .

Only after you have a general sense of inputs/outputs/choices/evaluations, and the form of a working system as a baseline, would you then mix-in techniques like word2vec or deep-NNs. And then, also, your questions here would be focused enough to answer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM