The X social media platform (formerly known as Twitter) has become one of the main media for discussing various issues and public opinions, including Pope Francis' visit to Indonesia on September 3-6, 2024. This study aims to analyze public opinion sentiment based on tweet data by applying the Naïve Bayes algorithm. Data collection was carried out through crawling techniques using the Twitter API, which was run on Google Colab. The Naïve Bayes algorithm is used to classify data into three types of sentiment: positive, negative, and neutral. Testing was conducted using training and testing data, and then evaluated through a confusion matrix to measure accuracy, precision, recall, and F1-score. The analysis results show that public opinion regarding the visit is positive, with an evaluation yielding average accuracy metric results, namely the 90:10 ratio reaching 74.37%, followed by the 80:20 ratio with 73.26%, the 70:30 ratio with 70.91%, and the 60:40 ratio with 66.44%. The best precision, recall, and F1-score metrics were obtained from the 90:10 ratio, which were 59.72%, 59.29%, and 59.48%, respectively. This research provides an overview of public perception regarding Pope Francis' visit and demonstrates the results of applying the Naïve Bayes algorithm. Thus, this application is expected to contribute to the advancement of sentiment analysis methods in public opinion analysis on various social issues.
                        
                        
                        
                        
                            
                                Copyrights © 2025