African Journal of
Mathematics and Computer Science Research

  • Abbreviation: Afr. J. Math. Comput. Sci. Res.
  • Language: English
  • ISSN: 2006-9731
  • DOI: 10.5897/AJMCSR
  • Start Year: 2008
  • Published Articles: 261

Article in Press

Fast Methods for Sentiment Analysis of Twitter Data

Valentine V. Nhlabano, Patricia E.N. Lutu

  •  Received: 27 December 2021
  •  Accepted: 11 May 2022
Web 2.0 technologies support the creation and publishing of various social media content in a collaborative and participatory way. The use of social media by the general public has led to the creation of vast amounts of structured, semi-structured and unstructured data. This has led to the adoption of social media by organisations of various sizes worldwide in order to take advantage of this new way of communication and engaging with their stakeholders. Twitter is one of the most widely adopted social networking services. The research reported in this paper was carried out to investigate fast methods for retrieving, storing and analysing Twitter data in real time in order to support business decision making. Sentiment analysis was conducted on Twitter data called tweets. A Twitter application was created and used to collect streams of real-time public data via a Twitter source provided by Apache Flume and efficiently storing this data in the Hadoop File System (HDFS). A Lexicon based sentiment analysis approach was adopted, and the AFINN-111 lexicon was used for sentiment analysis. The Twitter data was analysed from the HDFS using a Java MapReduce implementation. The system was able to stream data from Twitter in real time, and to store the data efficiently into the HDFS. The system was also able to process massive amounts of data in a single Hadoop cluster using MapReduce. The performance measures of accuracy, precision, recall and the f-measure indicated that the proposed system provides a high level of predictive performance for sentiment analysis.