Advanced large language models for text analytics and consumer opinion analysis

  • Nilesh Jain Department of Computer Science and Applications, Mandsaur University, Mandsaur, India
Abstract

Large e-commerce sites receive many customer reviews, offering valuable insights into consumer experiences, preferences, and opinions. However, unstructured, high-volume review text makes manual analysis inefficient. This study introduces a Textual Analysis and Consumer Sentiment Classification Approach based on a BERT framework, using the Amazon customer review dataset of 30,841 reviews. The proposed structure handles cleaning, tokenization, feature preparation, class balancing, contextual representations, and BERT-based sentiment classification. The data is first stratified to ensure the two classes are evenly distributed, then split 80/20 into training and testing sets. Then, only the training data is balanced using SMOTE. The BERT model is trained to understand word context and categorize reviews by sentiment. The experimental results show the proposed model has an accuracy (ACC) of 95.94%, precision (PRE) of 95.91%, recall (REC) of 95.97%, and F1 score (F1) of 95.92%. The results show that BERT can model context-aware information in customer reviews and automatically classify sentiment and extract valuable insights from customer feedback in large-scale e-commerce scenarios.

Graphical Abstract
Keywords
Sentiment analysis Product reviews BERT Model Text preprocessing Machine Learning classification E-commerce
References
  1. N. Bhatt, “A Hybrid Artificial Intelligence Model for Product Recommendation in Online Retail System,” in Artificial Intelligence Systems (AIS 2026), 2026, pp. 1–7.
  2. J. A. Aguilar-Moreno, P. R. Palos-Sanchez, and R. Pozo-Barajas, “Sentiment analysis to support business decision-making. A bibliometric study,” AIMS Math., vol. 9, no. 2, pp. 4337–4375, 2024, doi: 10.3934/math.2024215.
  3. O. H. Kwon et al., “Sentiment analysis of the United States public support of nuclear power on social media using large language models,” Renew. Sustain. Energy Rev., vol. 200, no. March, p. 114570, 2024, doi: 10.1016/j.rser.2024.114570.
  4. S. Areed, O. Alqaryouti, B. Siyam, and K. Shaalan, “Aspect-Based Sentiment Analysis for Arabic Government Reviews,” 2020, pp. 143–162. doi: 10.1007/978-3-030-34614-0_8.
  5. R. K. Kodali, P. Bharatha, and L. Boppana, “Mental Health Evaluation Through Text Analysis,” in TENCON 2024 - 2024 IEEE Region 10 Conference (TENCON), IEEE, Dec. 2024, pp. 165–169. doi: 10.1109/TENCON61640.2024.10902931.
  6. M. R. Baker and A. Utku, “Unraveling user perceptions and biases: A comparative study of ML and DL models for exploring Twitter sentiments towards ChatGPT,” J. Eng. Res., vol. 13, no. 2, pp. 1658–1665, Jun. 2025, doi: 10.1016/j.jer.2023.11.023.
  7. A. Banjar, Z. Ahmed, A. Daud, R. Ayaz Abbasi, and H. Dawood, “Aspect-Based Sentiment Analysis for Polarity Estimation of Customer Reviews on Twitter,” Comput. Mater. Contin., vol. 67, no. 2, pp. 2203–2225, 2021, doi: 10.32604/cmc.2021.014226.
  8. A.-G. Chifu and S. Fournier, “Sentiment Difficulty in Aspect-Based Sentiment Analysis,” Mathematics, vol. 11, no. 22, p. 4647, Nov. 2023, doi: 10.3390/math11224647.
  9. M. D. Devika, C. Sunitha, and A. Ganesh, “Sentiment Analysis: A Comparative Study on Different Approaches,” Procedia Comput. Sci., vol. 87, pp. 44–49, 2016, doi: 10.1016/j.procs.2016.05.124.
  10. K. Dixit, “AI-Assisted Decision Support Systems for Front Office Operations,” ESP J. Eng. & Technol. Adv., vol. 5, no. 1, pp. 112–119, 2025, doi: 10.56472/25832646/JETA-V5I1P114.
  11. D. M. E.-D. M. Hussein, “A survey on sentiment analysis challenges,” J. King Saud Univ. - Eng. Sci., vol. 30, no. 4, pp. 330–338, Oct. 2018, doi: 10.1016/j.jksues.2016.04.002.
  12. M. R. C. Mukkolakkal, “1.5 Million Messages Per Second on 3 Machines : Benchmarking and Latency Optimization of Apache Pulsar at Enterprise Scale,” arXiv J., pp. 8–11, 2026, doi: 10.48550/arXiv.2603.29113.
  13. Q. Pan, X. Zheng, and G. Chen, “A Mix-model based Deep Learning for Text Sentiment Analysis,” in 2018 International Conference on Cloud Computing, Big Data and Blockchain (ICCBB), IEEE, Nov. 2018, pp. 1–6. doi: 10.1109/ICCBB.2018.8756420.
  14. W. Medhat, A. Hassan, and H. Korashy, “Sentiment analysis algorithms and applications: A survey,” Ain Shams Eng. J., vol. 5, no. 4, pp. 1093–1113, Dec. 2014, doi: 10.1016/j.asej.2014.04.011.
  15. A. S. Rathor, A. Agarwal, and P. Dimri, “Comparative Study of Machine Learning Approaches for Amazon Reviews,” Procedia Comput. Sci., vol. 132, pp. 1552–1561, 2018, doi: 10.1016/j.procs.2018.05.119.
  16. S. Devarakonda, R. Lingam, and V. Challa, “Confidence-Gated RAG for Adaptive Retrieval in Sequential Agents,” in ICLR 2026 Workshop on Logical Reasoning of Large Language Models, ICLR, 2026, pp. 01–10, Apr.
  17. M. Yadav and V. Bhojane, “Semi-Supervised Mix-Hindi Sentiment Analysis using Neural Network,” in 2019 9th International Conference on Cloud Computing, Data Science & Engineering (Confluence), IEEE, Jan. 2019, pp. 309–314. doi: 10.1109/CONFLUENCE.2019.8776943.
  18. A. Ejaz, Z. Turabee, M. Rahim, and S. Khoja, “Opinion mining approaches on Amazon product reviews: A comparative study,” in 2017 International Conference on Information and Communication Technologies (ICICT), IEEE, Dec. 2017, pp. 173–179. doi: 10.1109/ICICT.2017.8320185.
  19. T. U. Haque, N. N. Saber, and F. M. Shah, “Sentiment analysis on large scale Amazon product reviews,” in 2018 IEEE International Conference on Innovative Research and Development (ICIRD), IEEE, May 2018, pp. 1–6. doi: 10.1109/ICIRD.2018.8376299.
  20. A. Dey, M. Jenamani, and A. De, “Consumer Sentiment-Driven Product Ranking Using a Feature-Level Deep Learning Approach: The Case of New and Refurbished Laptops,” IEEE Trans. Eng. Manag., vol. 73, pp. 510–526, 2026, doi: 10.1109/TEM.2025.3633709.
  21. T.N.P.Nalini, N.Sathiyendran, and R. S, “Consumer Sentiment Analysis Towards Lluvia Bike Products Using Machine Learning Approaches,” in 2025 First International Conference of Advances in Engineering and Computing Technologies for Sustainable Development (AECTSD), IEEE, Dec. 2025, pp. 1–6. doi: 10.1109/AECTSD65988.2025.11411514.
  22. S. Rongala, S. A. Pahune, H. Velu, and S. Mathur, “Leveraging Natural Language Processing and Machine Learning for Consumer Insights from Amazon Product Reviews,” in 2025 3rd International Conference on Smart Systems for applications in Electrical Sciences (ICSSES), 2025, pp. 1–6. doi: 10.1109/ICSSES64899.2025.11009528.
  23. S. K. Murugan, S. Jayachandran, G. Mageshwari, J. Latha, and N. G, “Sentimental Insight 2.0: Exploring the Frontiers of Opinion Mining with Deep Learning,” in 2024 International Conference on Distributed Computing and Optimization Techniques (ICDCOT), IEEE, Mar. 2024, pp. 1–6. doi: 10.1109/ICDCOT61034.2024.10515707.
  24. R. Padate, A. Gupta, P. Chakrabarti, and A. Sharma, “Emotion Recognition from WhatsApp Text Messages Using Unsupervised Machine Learning,” in 2024 8th International Conference on I-SMAC (IoT in Social, Mobile, Analytics and Cloud) (I-SMAC), IEEE, Oct. 2024, pp. 1871–1876. doi: 10.1109/I-SMAC61858.2024.10714817.
  25. M. P. Abraham, K. R. Udaya Kumar Reddy, and S. Abraham, “Aspect Based Sentiment Analysis System using Machine Learning Techniques,” in 2023 IEEE International Conference on Distributed Computing, VLSI, Electrical Circuits and Robotics (DISCOVER), IEEE, Oct. 2023, pp. 25–30. doi: 10.1109/DISCOVER58830.2023.10316716.
  26. R. M. Polam, B. Kamarthapu, A. B. Kakani, S. K. K. Nandiraju, S. K. Chundru, and S. R. Vangala, “Big Text Data Analysis for Sentiment Classification in Product Reviews Using Advanced Large Language Models,” Int. J. AI, Big Data, Comput. Manag. Stud., vol. 2, no. 2, pp. 55–65, 2021, doi: 10.63282/3050-9416.ijaibdcms-v2i2p107.
  27. G. U. 1 and U. A. Halima Farrukh 1, *, “Sentiment Analysis of Amazon Customer Review by Using Machine Learning Models,” 2025 IEEE 5th Int. Conf. Comput. Commun. Artif. Intell. CCAI 2025, vol. 2, pp. 925–930, 2025, doi: 10.1109/CCAI65422.2025.11189431.
  28. A. S. M. AlQahtani, “Product Sentiment Analysis for Amazon Reviews,” Int. J. Comput. Sci. Inf. Technol., vol. 13, no. 3, pp. 15–30, Jun. 2021, doi: 10.5121/ijcsit.2021.13302.
  29. . A., . A., A. Baniwal, and R. Chauhan, “Analyzing the Customer Opinion in Products Using Machine Learning Techniques,” Int. J. Multidiscip. Res., vol. 7, no. 3, pp. 1–7, 2025, doi: 10.36948/ijfmr.2025.v07i03.44084.