This study aims to analyze public perception of traffic congestion in Palembang City through sentiment analysis on Facebook using the Decision Tree algorithm. Data were collected from public comments related to traffic over 32 months using web scraping techniques. Text data were processed through preprocessing stages including case folding, tokenization, stemming, and stopword removal, followed by TF-IDF feature extraction with unigram representation. The model classifies sentiments into positive, negative, and neutral categories. The results show an accuracy of 90.42%. However, the model tends to perform better on the neutral class, influenced by imbalanced data distribution. Therefore, evaluation metrics such as precision and recall are also considered to provide a more comprehensive analysis.
Copyrights © 2026