Swapnil Athawale (B15CS038)
To get the opinion of peoples on any topic/product/issue. Any company would want to know how people are reacting to its product. Any political party would want to know whether people are supporting or not.
To determine whether the expressed tweet is expressing positive or negative view about that topic. To classify the given tweet into positive or negative category.
To find the best dataset for training and testing.
To try various feature extraction techniques.
- bag of words model
- word2vec model
- CountVectorizer
To try 2 different approaches for predicting sentiment.
- Lexicon based approach
- Machine Learning
To try out various models.
- Linear Regression
- Naive Bayes
- Sequential Model
Preprocess tweet into tokens. Remove hashtag, hyperlinks, stopwords. Used word2vec neural network model to convert every token into vector. Multiplying every word with its tf-idf score and taking average over the sum of all tokens(words) in specific tweet to make sent2vec (vectors for sentence). Training on sequential deep neural network (using Keras). Collecting new tweets from Twitter to predict sentiment. Display the predictions on webpage.
We were able to achieve 2 models
- 85% accuracy on http://cs.stanford.edu/people/alecmgo/trainingandtestdata.zip
- 76% accuracy on http://www.sananalytics.com/lab/twitter-sentiment/
- Dataset we provide has to be larger than mentioned above.
- It performs fairly well within same dataset.
- Though it performs very well within the same dataset it doesn’t perform very well with new random tweets.
- Deep Neural Network perform better than other machine learning models like Naive Bayes.
- Dataset 1 from stanford contains 1.6 million tweets with sentiment derived by emoticon.
- Dataset 2 from Sanders Analysis contains 1.57 million tweets with hand-classified sentiments.
- https://www.youtube.com/watch?v=si8zZHkufRY&t=501s
- https://blog.griddynamics.com/creating-training-and-test-data-sets-and-preparing-the-data-for-twitter-stream-sentiment-analysis-of-social-movie-reviews/
- http://www.awesomestats.in/python-sentiment-tweets/
- http://cv-tricks.com/tensorflow-tutorial/save-restore-tensorflow-models-quick-complete-tutorial/
- https://realpython.com/flask-by-example-part-3-text-processing-with-requests-beautifulsoup-nltk/
- https://machinelearningmastery.com/clean-text-machine-learning-python/
- https://code.tutsplus.com/tutorials/creating-a-web-app-from-scratch-using-python-flask-and-mysql--cms-22972
- A survey of sentiment analysis techniques https://ieeexplore.ieee.org/document/8058315/
- A Comparison between Preprocessing Techniques for Sentiment Analysis in Twitter https://ceur-ws.org/Vol-1748/paper-06.pdf