Understanding Consumer Sentiments: A TextBlob-Based Sentiment Analysis Study

Main Article Content

Dian Kurniasari
Yazid Zinedine Hdiana
Favorisen R. Lumbanraja
Warsono Warsono
Normi Abdul Hadi

Abstract

This study employs advanced sentiment analysis techniques to enhance the understanding of drug reviews, with a specific focus on TextBlob-based sentiment classification. As the accessibility of health products through pharmacies and online platforms continues to increase, individuals with limited health literacy are increasingly relying on user-generated feedback to inform their decision-making. By utilizing the TextBlob labelling method, this research categorizes user sentiments into positive, neutral, or negative, addressing the limitations inherent in traditional sentiment analysis approaches. The analysis is supported by an innovative model known as BERT, which effectively captures the emotional expression within textual data. The results indicate that the proposed approach consistently achieves an accuracy of 98% across training, validation, and testing phases, highlighting its strong performance in sentiment classification. This accomplishment underscores TextBlob’s ability to consistently and reliably assess user sentiment, thereby enriching the understanding of consumer perspectives in the pharmaceutical industry. The findings highlight the importance of effective sentiment analysis methods in healthcare, offering valuable insights for both consumers and stakeholders. Moreover, this study provides a foundation for future investigations focused on improving sentiment analysis methods across varied datasets, which will enhance the precision and applicability of classification results in different scenarios.

Article Details

Section
Articles

References

[1] Dhrubajyoti Hazarika, Gitimallika Konwar, Suman Deb, and Dhruba J. Bora. Sentiment analysis on Twitter by using TextBlob for natural language processing. In Proceedings of the International Conference on Research in Management & Technovation 2020, pp. 63–67, 2020.

[2] Purnima Garg, Shweta Tyagi, Anshul Joshi, Ashish Pandey, and Divakar Panwar. Supervised machine learning approaches for customer reviews sentiment analysis. In Lecture Notes in Networks and Systems, pp. 211–223. Springer Nature Singapore, 2024.

[3] Jannatun Roba Jim, Md Al Amin Talukder, Promit Malakar, Md Monzurul Kabir, Kazi Nur, and Md Faijalah Mridha. Recent advancements and challenges of NLP-based sentiment analysis: A state-of-the-art review. Natural Language Processing Journal, 6:100059, 2024.

[4] Amara Rashid and Chen Huang. Sentiment analysis on consumer reviews of Amazon products. International Journal of Computer Theory and Engineering, 13(2):35–41, 2021.

[5] Elham Asani, Hatef Vahdat-Nejad, and Javad Sadri. Restaurant recommender system based on sentiment analysis. Machine Learning with Applications, 6:100114, 2021.

[6] Weidong Huang, Min Lin, and Yutong Wang. Sentiment analysis of Chinese e-commerce product reviews using ERNIE word embedding and attention mechanism. Applied Sciences, 12(14):7182, 2022.

[7] Nausheen Sultana, Pavan Kumar, Subhash Chandra, Mahindra Rajesh Patra, and S.K. Safdar Alam. Sentiment analysis for product review. International Research Journal of Modernization in Engineering Technology and Science, 5(3):2501–2503, 2023.

[8] Varuna Gooljar, Thea Issa, Shri Hardin-Ramanan, and Bilal Abu-Salih. Sentiment-based predictive models for online purchases in the era of Marketing 5.0: A systematic review. Journal of Big Data, 11(1):107, 2024.

[9] T.A. Kumar, J. Zaafira, P. Kanimozhi, R. Rajmohan, C. Ananth, and S.A. Ajagbe. Machine learning and sentiment analysis: Analyzing customer feedback. In AI-Driven Marketing Research and Data Analytics, pp. 245–262. IGI Global, 2024.

[10] Pavan Kumar Jain, Rajasekhar Pamula, and Emre A. Yekun. A multi-label ensemble predicting model to service recommendation from social media contents. The Journal of Supercomputing, 78(4):5203–5220, 2022.

[11] Qian Amy Xu, Victor Chang, and Chrisina Jayne. A systematic review of social media-based sentiment analysis: Emerging trends and challenges. Decision Analytics Journal, 3:100073, 2022.

[12] Zhi-Hong Zhang, Qiong-Biao Ye, Zheng-Yan Zhang, and Yong-Li Li. Sentiment classification of internet restaurant reviews written in Cantonese. Expert Systems with Applications, 38(6):7674–7682, 2011.

[13] Nima Kordzadeh. Investigating bias in the online physician reviews published on healthcare organizations’ websites. Decision Support Systems, 118:70–82, 2019.

[14] Anggita S. P. Braja and Abdul Kodar. Implementasi fine-tuning BERT untuk analisis sentimen terhadap review aplikasi PUBG Mobile di Google Play Store. JIMP – Jurnal Informatika Merdeka Pasuruan, 7(3):120–128, 2023.

[15] Samer Al-Natour and Ozgur Turetken. A comparative assessment of sentiment analysis and star ratings for consumer reviews. International Journal of Information Management, 54:102132, 2020.

[16] Frank Z. Xing, Federico Pallucchini, and Erik Cambria. Cognitive-inspired domain adaptation of sentiment lexicons. Information Processing & Management, 56(3):554–564, 2019.

[17] Sukruth Mendon, Piyush Dutta, Abhishek Behl, and Stefan Lessmann. A hybrid approach of machine learning and lexicons to sentiment analysis: Enhanced insights from Twitter data of natural disasters. Information Systems Frontiers, 23(5):1145–1168, 2021.

[18] Yirong Mao, Qian Liu, and Yan Zhang. Sentiment analysis methods, applications, and challenges: A systematic literature review. Journal of King Saud University – Computer and Information Sciences, 36(4):102048, 2024.

[19] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT 2019), pp. 4171–4186, 2019.

[20] An Zhao and Yanyan Yu. Knowledge-enabled BERT for aspect-based sentiment analysis. Knowledge-Based Systems, 227:107220, 2021.

[21] Ken Li Tan, Chien-Ping Lee, and Kian-Ming Lim. A survey of sentiment analysis: Approaches, datasets, and future research. Applied Sciences, 13(7):4550, 2023.

[22] Agnieszka Kiersztyn and Krzysztof Kiersztyn. The impact of data preprocessing on prediction effectiveness. In Artificial Intelligence and Soft Computing: 21st International Conference, ICAISC 2023, pp. 353–362. Springer, 2023.

[23] Sanaz Fotouhi, Saeideh Asadi, and Mugahed W. Kattan. A comprehensive data level analysis for cancer diagnosis on imbalanced data. Journal of Biomedical Informatics, 90:103089, 2019.

[24] Joseph M. Johnson and Taghi M. Khoshgoftaar. Deep learning and thresholding with class-imbalanced big data. In 2019 18th IEEE International Conference on Machine Learning and Applications (ICMLA), pp. 755–762. IEEE, 2019.

[25] Mardhiah Hayaty, Muthmainah, and Sayed M. Ghufran. Random and synthetic over-sampling approach to resolve data imbalance in classification. Int. J. Artif. Intell. Res., 4(2):86–92, 2021.

[26] Ibrahim O. Muraina. Ideal dataset splitting ratios in machine learning algorithms: General concerns for data scientists and data analysts. In 7th International Mardin Artuklu Science Research Conference, pp. 496–504, 2022.

[27] Subhankar Paul and Srijan Saha. CyberBERT: BERT for cyberbullying identification. Multimedia Systems, 28(6):1897–1904, 2022.

[28] Asti Aprilia Arifiyanti, Ramadhana Mahendra Pradana, and Ivan Fatcha Novian. Klasifikasi produk retur dengan algoritma pohon keputusan C4.5. Jurnal IPTEK, 22(1):79–86, 2018.

[29] Pradeep Kumar Yechuri and Sriram Ramadass. Classification of image and text data using deep learning-based LSTM model. Traitement du Signal, 38(6):1809–1817, 2021.

[30] Mohammad Hossin and M. Sulaiman. A review on evaluation metrics for data classification evaluations. International Journal of Data Mining & Knowledge Management Process, 5(2):1–11, 2015.