Sentiment Analysis on Twitter Data using Machine Learning Techniques

  • Muhammad Faizan Siddiqui H–Cloud & Infrastructure Services Systems Limited Lahore, Pakistan
  • Faiza Iqbal Department of Computer Science University of Management and Tecnology Lahore, Pakistan
  • Naveed Hussain Department of Computer Science University of Central Punjab Lahore, Pakistan
Keywords: Supervise learning, Natural Language Processing, Machine Learning, Scikit-learn


Sentiment analysis is a major field of text mining domain. It is used to analyze opinions, sentiments and ideas from any natural language text for example English. In this paper, we have presented an application called “Tweemotions” which uses sentiment analyses to find the opinion about tweets and categorized it as positive or negative comment. The application is, first, trained and tested using a dataset which consists of thousands of tweets obtained from NLTK Corpora. Later, it is trained and tested on twitter’s data directly from obtained from Twitter. Tweemotions is trained and tested using seven “Machine Learning” algorithms such as BernoulliNB, MultinomialNB,  Logistic Regression, stochastic gradient descent (SGD) classifier, LinearSVC, SVC, and NuSVC. The application achieved above 81% accuracy when trained using MultinomialNB, BernoulliNB, SVC and NuSVC.

How to Cite
M. F. Siddiqui, F. Iqbal, and N. Hussain, “Sentiment Analysis on Twitter Data using Machine Learning Techniques”, jictra, pp. 30-38, Dec. 2021.
Original Articles