Abstract
Sentiment analysis (SA) aims to categorize people's opinions into distinct categories, such as positive or negative, based on provided text. Over the years, a multitude of methods, techniques, and enhancements have been proposed to address the challenges of SA across different tasks and levels. Sentiment analysis serves as an approach to analyze data and extract the sentiments it encapsulates. Specifically focusing on Twitter, sentiment analysis applied to Twitter data, commonly referred to as Twitter sentiment analysis, aims to extract sentiments expressed by users in their tweets. The research in this field has consistently grown in the past decades, mainly due to the unique format of tweets, which presents distinct processing difficulties. The brevity of tweets introduces a new dimension of challenges, including the use of slang, abbreviations, and other linguistic nuances. This chapter extensively examines three artificial intelligence algorithms, namely naïve bayes, k-nearest neighbor (KNN), and decision tree, by comparing their overall accuracy, precision, recall values.