Twitter become a platform for Indonesians to express views on various issues, including the mandatory halal certification policy regulated by Law Number 33 of 2014 on Halal Product Assurance. The first phase of this certification runs from October 17, 2019, to October 17, 2024, covering: (1) food and beverages; (2) raw materials, food additives, and auxiliary materials; and (3) slaughter products and services. This research analyzes public sentiment on Twitter towards this policy using the Naive Bayes and KNN algorithm. Analysis of 536 tweets revealed 307 neutral (57.3%), 145 positive (27.1%), and 84 negative sentiments (15.7%). The findings highlight public support and criticism of the policy. The model Naïve Bayes showed an accuracy of 82.7% and KNN 81.62%, demonstrating its effectiveness in classifying new sentiments. This research aids the government's decision-making process in evaluating the mandatory halal certification policy, ensuring it aligns with public needs and is well-received by Indonesians.
                        
                        
                        
                        
                            
                                Copyrights © 2025