Sentiment Analysis of Product Reviews in E-Commerce Using the Naive Bayes Method
Keywords:
sentiment analysis, naive bayes, e-commerce, text classification, customer reviewsAbstract
In the rapidly growing world of e-commerce, customer reviews play a crucial role in influencing purchasing decisions. However, the massive volume of online reviews makes it difficult for potential buyers and sellers to interpret the overall sentiment toward a product. This research aims to perform sentiment analysis on product reviews in e-commerce platforms using the Naive Bayes classification method. The study focuses on classifying reviews into positive, negative, and neutral categories based on textual data. The dataset used consists of customer reviews collected from popular e-commerce sites. The data preprocessing stages include case folding, tokenization, stop word removal, and stemming to ensure clean and meaningful input for the model. The Naive Bayes algorithm, known for its simplicity and efficiency in text classification, is applied to train and predict sentiment labels. Evaluation is conducted using accuracy, precision, recall, and F1-score metrics to measure model performance. Experimental results show that the Naive Bayes classifier achieves high accuracy in detecting sentiment polarity, making it suitable for large-scale sentiment analysis in e-commerce contexts. The findings demonstrate that sentiment analysis can provide valuable insights for businesses in understanding customer satisfaction, improving products, and enhancing overall marketing strategies.
References
Bird, S., Klein, E., & Loper, E. (2009). Natural Language Processing with Python. O’Reilly Media.
Cambria, E., Schuller, B., Liu, B., Wang, H., & Havasi, C. (2017). Knowledge-based approaches to concept-level sentiment analysis. IEEE Transactions on Affective Computing, 7(1), 14–31. https://doi.org/10.1109/TAFFC.2015.2432819
Chevalier, J. A., & Mayzlin, D. (2006). The effect of word of mouth on sales: Online book reviews. Journal of Marketing Research, 43(3), 345–354. https://doi.org/10.1509/jmkr.43.3.345
Han, J., Kamber, M., & Pei, J. (2012). Data Mining: Concepts and Techniques (3rd ed.). Morgan Kaufmann.
Jianqiang, Z., & Xiaolin, G. (2017). Comparison research on text preprocessing methods on Twitter sentiment analysis. IEEE Access, 5, 2870–2879. https://doi.org/10.1109/ACCESS.2017.2672677
Kohavi, R. (1995). A study of cross-validation and bootstrap for accuracy estimation and model selection. IJCAI Proceedings, 14(2), 1137–1145.
Laudon, K. C., & Traver, C. G. (2021). E-Commerce 2021: Business, Technology, Society. Pearson Education.
Liu, B. (2012). Sentiment Analysis and Opinion Mining. Morgan & Claypool Publishers. https://doi.org/10.2200/S00416ED1V01Y201204HLT016
Manning, C. D., Raghavan, P., & Schütze, H. (2008). Introduction to Information Retrieval. Cambridge University Press. https://doi.org/10.1017/CBO9780511809071
McCallum, A., & Nigam, K. (1998). A comparison of event models for Naive Bayes text classification. AAAI-98 Workshop on Learning for Text Categorization, 41–48.
Mikolov, T., Chen, K., Corrado, G., & Dean, J. (2013). Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781. https://arxiv.org/abs/1301.3781
Pang, B., & Lee, L. (2008). Opinion Mining and Sentiment Analysis. Foundations and Trends in Information Retrieval, 2(1–2), 1–135. https://doi.org/10.1561/1500000011
Rish, I. (2001). An empirical study of the Naive Bayes classifier. IJCAI Workshop on Empirical Methods in Artificial Intelligence, 41–46.
Sebastiani, F. (2002). Machine learning in automated text categorization. ACM Computing Surveys, 34(1), 1–47. https://doi.org/10.1145/505282.505283
Tripathy, A., Agrawal, A., & Rath, S. K. (2016). Classification of sentiment reviews using N-gram machine learning approach. Expert Systems with Applications, 57, 117–126. https://doi.org/10.1016/j.eswa.2016.03.028
Vinodhini, G., & Chandrasekaran, R. M. (2012). Sentiment analysis and opinion mining: A survey. International Journal of Advanced Research in Computer Science and Software Engineering, 2(6), 282–292.
Zhang, L., Wang, S., & Liu, B. (2018). Deep learning for sentiment analysis: A survey. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, 8(4), e1253. https://doi.org/10.1002/widm.1253
Zhang, Y., & Wallace, B. (2017). A sensitivity analysis of (and practitioners’ guide to) convolutional neural networks for sentence classification. arXiv preprint arXiv:1510.03820. https://arxiv.org/abs/1510.03820
Taboada, M., Brooke, J., Tofiloski, M., Voll, K., & Stede, M. (2011). Lexicon-based methods for sentiment analysis. Computational Linguistics, 37(2), 267–307. https://doi.org/10.1162/COLI_a_00049
Turney, P. D. (2002). Thumbs up or thumbs down? Semantic orientation applied to unsupervised classification of reviews. Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics (ACL), 417–424. https://doi.org/10.3115/1073083.1073153
Published
How to Cite
Issue
Section
Copyright (c) 2025 Afrizal Zein, Mufidah Karimah

This work is licensed under a Creative Commons Attribution 4.0 International License.



