Evolving a framework to observe and analyse customer experience on the Twitter platform using machine learning techniques
Authors:   , Moodley Thaneshni 
Published: October 2024

Retailers have become more focused on retaining and turning existing customers into longterm clients because retailers have become more competitive, customers more demanding, and competitors more aggressive. The 2020 COVID-19 pandemic has forced a transformation for retailers. Within months, a revolution has taken place, constituting major changes to how consumers view cash, how they shop online and what they expect from retailers as part of a positive buying experience. Consumers increasingly expect retailers to create a seamless customer experience. This often means leaning on digital capabilities to create a seamless, omni-channel experience by linking different aspects of the customer shopping experience. The usage of big data analytics has primarily been implemented outside of South Africa to better understand customer connections and experiences, highlighting a noticeable research gap in South Africa. It has been proven to be an effective tool for retailers in predicting customer behaviour. There is a need to reduce the complexities in understanding which are the most appropriate machine learning techniques for sentiment analysis of online customer experience and to capitalise on development. Thereafter, online retailers are better equipped to tailor machine learning tools to craft analytical tools. Given the massive migration to online transactions, this work presents a rigorous analysis of social media posts, which is paramount for modern-era retailers. Businesses can use sentiment analysis to determine how well their brand is performing in the marketplace, learn more about the attitudes of their customers and determine whether their items receive more positive or negative feedback. A longitudinal study was adopted to analyse a dataset of retail-related tweets for the identification of customer complaints using a sentiment analysis hybrid approach, which is a combination of lexicon and machine learning approaches. A conceptual framework was developed to observe and analyse customer experiences on the Twitter platform using machine learning techniques. The framework encompasses components such as data preparation, natural language processing pre-processing techniques, calculating sentiment using sentiment lexicon and ML techniques, and thereafter a selection of the best-performing machine learning technique for sentiment analysis within the developed conceptual framework. The extracted dataset contains 240 000 tweets posted between 01 January 2017 and 31 January 2019, out of which 27 233 tweets were selected for the study. Natural language pre-processing techniques were applied to the dataset, including tokenisation, stemming, lemmatisation, part-of-speech tagging, and name-of-entity recognition. Supervised and deep machine learning gave the best results of 61.75 and 60.25. This study has identified deep learning as a good technique for sentiment analysis when NLP pre-processing methods are done in a certain order. A study on analysing retail complaints posted on the Twitter platform using a sentiment analytic framework has not been done in South Africa before. This study has proven that the sentiment analysis hybrid approach is highly capable of analysing social media data.