JOURNAL ARTICLE

Multinomial Naive Bayes Based Machine Learning Analysis of Twitter Sentiment

Abstract

Sentiment analysis identifies and categorizes thoughts and feelings expressed in the source text. Social media uses tweets, status updates, and blog columns to generate sensitive data. SA on user-generated data helps understand crowd opinion. Due to slang and spelling errors, Twitter sentiment analysis (TSA) is much more complex than general sentiment analysis. Every day, millions of tweets are generated on various topics. Machine learning algorithms can be used to solve this problem-the proposed machine learning algorithm includes preprocessing, weight calculation, feature extraction, and classification. First, we collected a Kaggle dataset from Twitter sentiment analysis. In the second step, the data preprocessing steps mainly include stop words, emoji, and repeated characters in words and URLs due to their low importance. Then, we used tokenization, normalization, stemming, and lemmatization to achieve better results. In the third step, we computed weights using word2vec to represent the tweets. In the fourth step, we use a feature extraction method consisting of TF-IDF and word embedding to check based on word and noun counts. Finally, TSA can be used to explore sentiment using Multinomial Naïve Bayes (MNB) and Maximum Entropy classification. The proposed machine learning algorithm achieves better results with TSA in terms of recognition accuracy, recall, precision and F-measure.

Keywords:
Sentiment analysis Computer science Artificial intelligence Naive Bayes classifier Word2vec Natural language processing Lexical analysis Stop words Word embedding Social media Preprocessor Machine learning Embedding Support vector machine World Wide Web

Metrics

2
Cited By
0.51
FWCI (Field Weighted Citation Impact)
18
Refs
0.66
Citation Normalized Percentile
Is in top 1%
Is in top 10%

Citation History

Topics

Sentiment Analysis and Opinion Mining
Physical Sciences →  Computer Science →  Artificial Intelligence
Text and Document Classification Technologies
Physical Sciences →  Computer Science →  Artificial Intelligence
Advanced Text Analysis Techniques
Physical Sciences →  Computer Science →  Artificial Intelligence
© 2026 ScienceGate Book Chapters — All rights reserved.