Sentiment Analysis Based on Bert for Amazon Reviewer

Document Type : Original Article

Authors

Higher Institute of Computers and Information Technology, Computer Dept., El. Shorouk Academy, Cairo, Egypt

Abstract

Sentiment analysis determines if a text includes subjective information and what that information represents, i.e., whether the text's attitude is positive, negative, or neutral. Understanding user-generated content sentiments automatically help commercial and political interests. Classify the polarity of words, phrases, or entire documents. The demand for sentiment analysis is raised due to the requirement of analyzing and structuring hidden information, extracted from Amazon reviews in form of unstructured data. The sentiment analysis is being implemented through deep learning, machine learning, and lexicon techniques. In the research, multiple machine learning algorithms are evaluated, trained, and tested using Amazon product reviews randomly picked from a 4 million-review Kaggle dataset. The performance of nine different algorithms was compared: KNN, Decision Tree, Naive Bayes, Random Forest, Logistic Regression, SVM, Bidirectional LSTM, GRU, and Bert to reach the highest performance (accuracy). The Bert resulted in the highest performance with an Accuracy of 0.94. Thereafter, to evaluate the Bert model, it was applied to 502,103 reviews, split into a 90% train set to train the model and a 10% test set to evaluate the Bert mode. It has been proven that Bert networks are very suitable for the classification of sentiment in product reviews.

Keywords

Main Subjects