Research Article Open Access

Twitter Sentiment Analysis for Reviewing Tourist Destinations in Saudi Arabia using Apache Spark and Machine Learning Algorithms

Wala Awadh Alasmari1 and Hoda Ahmed Abdelhafez1,2
  • 1 Department of Information Technology, College of Computer and Information Sciences, Princess Nourah University, Saudi Arabia
  • 2 Faculty of Computers and Informatics, Suez Canal University, Ismailia, Egypt

Abstract

The appearance of big data has created new challenges for data analysis teams especially dealing with unstructured data in text form. Many applications increasingly include a large amount of this type of data. Example of such data is data collected from Twitter. Adequate use of Machine Learning (ML), big data tools and social media platforms can solve several problems. The aim of this research is to apply sentiment analysis using Arabic tweets of tourism in Saudi Arabia and determine the most visited places.  Ara Senti corpus was used as the labelled data to perform machine learning for sentiment analysis to deal with the Arabic morphology.  The three-classes classification (Positive, Negative, or Neutral) was performed using Decision Tree, Random Forest, Logistic Regression and Naïve Bayes. The results showed that the highest performance achieved was 86% using Logistic Regression with Term Frequency–Inverse Document Frequency (TF-IDF) representation and Naïve Bayes with Bag-of-Words model compared with both random forest and decision tree.  The trainable classifier was applied to predict classes on collected data from Twitter for reviewing Kingdom of Saudi Arabia (KSA) destinations to finally present a rating of the most visited places on KSA. There are five most visited places in Saudi Arabia (Riyadh, Alula, Hail, Taif and Tabuk).

Journal of Computer Science
Volume 18 No. 3, 2022, 215-226

DOI: https://doi.org/10.3844/jcssp.2022.215.226

Submitted On: 16 December 2021 Published On: 7 April 2022

How to Cite: Alasmari, W. A. & Abdelhafez, H. A. (2022). Twitter Sentiment Analysis for Reviewing Tourist Destinations in Saudi Arabia using Apache Spark and Machine Learning Algorithms. Journal of Computer Science, 18(3), 215-226. https://doi.org/10.3844/jcssp.2022.215.226

  • 2,689 Views
  • 1,444 Downloads
  • 3 Citations

Download

Keywords

  • Twitter
  • Big Data
  • Machine Learning
  • Sentiment Analysis
  • Tourism