

As social media and online social networking sites have emerged as essential channels for everyday social interactions, researchers are increasingly turning to conversational social media as a valuable alternative source of insights into public sentiment and behavior during times of crisis. In a similar vein, our study investigates the utility of using conversational social media data for analyzing public sentiment related to the COVID-19 pandemic. Our research question is, to what extent can machine learning models based on conversational social media data help gauge public sentiment during a pandemic? To evaluate the performance of various machine learning algorithms in sentiment analysis tasks, we used a Twitter dataset and compared their effectiveness using eight different models (i.e., Decision Tree (DT), Random Forest (RF), Naïve Bayes (NB), Extreme Gradient Boosting (XGBoost), Logistic Regression, Support Vector Machine (SVM), Long Short-Term Memory (LSTM), and Bidirectional Encoder Representations from Transformers (BERT)). The results show that among the eight models, the top three models are BERT, LSTM, and SVM, achieving overall accuracies of 87.44%, 81.94%, and 80.02%, respectively. Employing sentiment analysis models on pandemic-related social media posts allows us to gain insights into of human emotions and sentiments during public health crises like a pandemic.