A Sentiment Analysis of Product Review Data Through Large Language Models (LLMs)
H. S. S. Sinha · 2024
Opinion mining, which can be classified as process of extracting subjective information from text data, remains one of the most widely researched areas in NLP even today. Because of its ability to gauge thoughts and opinions of people it has garnered lot of interest from both scholars and practitioners. A Lot of advancement has been made in this area with the help of large language models (LLMs). This paper aims to compare the sentiment classification on Amazon product review dataset using the various types of LLMs, including BERT and TF-IDF models. Thus, the resultant dataset containing 59,794 total reviews was pre-processed and further split into the training and testing sets. When performing the Exploratory Data Analysis (EDA) it was determined there were three sentiments; Positive, Negative and Neutral. The measurements, namely F1-score, recall, accuracy, and precision, were used to compare the performances of the developed models. Analysis showed that an accuracy of TF-IDF model was enhanced by 15.59% as compared to the BERT model that yielded an accuracy of only 78. 91%. This study further embraces the use of TF-IDF and LLM for sentiment analysis and highlights directions for future studies to improve the model reliability and efficiency by eradicating false prediction gaps and integrating other complicated approaches such as ensemble learning.