Research Article
Open access
Published on 31 October 2023
Download pdf
Zhang,Z. (2023). Sentiment Analysis of Twitter Comments Using Naive Bayes Classifier. Communications in Humanities Research,10,262-268.
Export citation

Sentiment Analysis of Twitter Comments Using Naive Bayes Classifier

Ziyao Zhang *,1,
  • 1 China University of Geosciences

* Author to whom correspondence should be addressed.

https://doi.org/10.54254/2753-7064/10/20231338

Abstract

Social media has a significant role in how people express their emotions and elaborate on their opinions in today's culture. There are many new forms of social media, and Twitter is one of them. In this experiment, the sentiment of pre-processed Twitter comment data was examined using naive Bayes and logistic regression techniques. In order to categorise the emotional tendency of text for Twitter comments, a naive Bayesian classifier is created. In processing this material, the Naive Bayes and logistic regression models' benefits and drawbacks are compared and summarised. Naive Bayes can achieve good accuracy with binary emotion analysis. The accuracy of the naive Bayes model is 0.06 points higher than that of logic training under identical processing settings, and the recall rate is 0.05 points higher.

Keywords

naive bayes, sentiment analysis, Twitter comment, natural language processing, machine learning

[1]. Chen Long, Guan Yu, He Jinhong, Peng Jinye. Research Progress in Sentiment Classification [J]. Journal of Computer Research and Development,2017,54(06):1150-1170.

[2]. C. Troussas, M. Virvou, K. J. Espinosa, K. Llaguno and J. Caro, "Sentiment analysis of Facebook statuses using Naive Bayes classifier for language learning," IISA 2013, Piraeus, Greece, 2013, pp. 1-6, doi: 10.1109/IISA.2013.6623713.

[3]. Lin Jianghao, Yang Aimin, Zhou Yongmei et al. A Naive Bayes based microblog Sentiment Classification [J]. Computer Engineering and Science,2012, 34(09):160-165.

[4]. Lu Ling, Wang Yue, Yang Wu. A Naive Bayes-based sentiment Classification Method for Chinese Comments [J]. Journal of Shandong University (Engineering Science),2013,43(06):7-11.

[5]. Y. Jianqiang and G. Xiaolin, "Comparison Research on Text Pre-processing Methods on Twitter Sentiment Analysis," in IEEE Access, vol. 5, pp. 2870-2879, 2017, doi: 10.1109/ACCESS.2017.2672677.

[6]. Li Jingmei, Sun Lihua, Zhang Qiarong, et al. A naive Bayesian classifier for Text Processing [J]. Journal of Harbin Engineering University,2003(01):71-74.

[7]. Combine HowNet lexicon to train phrase recursive autoencoder for sentence-level sentiment analysis[J]. Xianghua Fu; Wangwang Liu; Yingying Xu; Laizhong Cui.Neurocomputing,2017.

[8]. Maron M E, Kuhns J L. On relevance, probabilistic indexing and information retrieval [J]. Journal of the ACM(JACM),1960,7(3):216-244.

[9]. Lewis D D. Naive(Bayes)at forty: The independence assumption in information retrieval[C]//Machine learning: ECML-98.Springer Berlin Heidelberg,1998:4-15.

[10]. EDITH LAW, BURR SETTLES, TOM MITCHELL.Machine learning and knowledge discovery in databases[M]. Springer Berlin Heidelberg:2010.

Cite this article

Zhang,Z. (2023). Sentiment Analysis of Twitter Comments Using Naive Bayes Classifier. Communications in Humanities Research,10,262-268.

Data availability

The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.

Disclaimer/Publisher's Note

The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of EWA Publishing and/or the editor(s). EWA Publishing and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

About volume

Volume title: Proceedings of the 4th International Conference on Educational Innovation and Philosophical Inquiries

Conference website: https://www.iceipi.org/
ISBN:978-1-83558-043-1(Print) / 978-1-83558-044-8(Online)
Conference date: 7 August 2023
Editor:Enrique Mallen, Javier Cifuentes-Faura
Series: Communications in Humanities Research
Volume number: Vol.10
ISSN:2753-7064(Print) / 2753-7072(Online)

© 2024 by the author(s). Licensee EWA Publishing, Oxford, UK. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license. Authors who publish this series agree to the following terms:
1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this series.
2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this series.
3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See Open access policy for details).