Sentiment analysis of customer reviews is a crucial component in understanding consumer perception of coffeeshop services, especially in Padang City. This study aims to enhance text classification performance by employing two machine learning algorithms, Support Vector Machine (SVM) and Naïve Bayes (NB) and optimizing them using Particle Swarm Optimization (PSO). To address data imbalance, the Synthetic Minority Over-sampling Technique (SMOTE) was applied. The dataset consists of customer reviews categorized into three sentiment classes: negative, neutral, and positive. Evaluation results indicate that the optimized SVM+PSO model achieved the highest accuracy of 78.57%, while NB+PSO achieved 73.21%. The implementation of PSO successfully improved the accuracy and f1-score compared to baseline models. This study demonstrates that combining SMOTE and PSO can significantly enhance the performance of multi-class sentiment classification in local business domains such as coffeeshops
Copyrights © 2026