A machine learning-based approach for sentiment analysis on distance learning from Arabic Tweets

PeerJ Comput Sci. 2022 Jul 26:8:e1047. doi: 10.7717/peerj-cs.1047. eCollection 2022.

Abstract

Social media platforms such as Twitter, YouTube, Instagram and Facebook are leading sources of large datasets nowadays. Twitter's data is one of the most reliable due to its privacy policy. Tweets have been used for sentiment analysis and to identify meaningful information within the dataset. Our study focused on the distance learning domain in Saudi Arabia by analyzing Arabic tweets about distance learning. This work proposes a model for analyzing people's feedback using a Twitter dataset in the distance learning domain. The proposed model is based on the Apache Spark product to manage the large dataset. The proposed model uses the Twitter API to get the tweets as raw data. These tweets were stored in the Apache Spark server. A regex-based technique for preprocessing removed retweets, links, hashtags, English words and numbers, usernames, and emojis from the dataset. After that, a Logistic-based Regression model was trained on the pre-processed data. This Logistic Regression model, from the field of machine learning, was used to predict the sentiment inside the tweets. Finally, a Flask application was built for sentiment analysis of the Arabic tweets. The proposed model gives better results when compared to various applied techniques. The proposed model is evaluated on test data to calculate Accuracy, F1 Score, Precision, and Recall, obtaining scores of 91%, 90%, 90%, and 89%, respectively.

Keywords: Apache Spark; Arabic language; E-Learning; Sentiment analysis; Social media; Twitter.

Grants and funding

The author received funding from the Deanship of Scientific Research at Umm Al-Qura University, Grant Code: (22UQU4331100DSR01). The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.