This study evaluates Indonesian public perceptions of the application of Pancasila Legal Philosophy in international diplomacy through sentiment analysis on Twitter. Using text mining and machine learning algorithms—Naïve Bayes, Support Vector Machine (SVM), and Random Forest—1,000 tweets containing keywords such as “Pancasila diplomacy,” “Indonesia at the UN,” and “Indonesian foreign policy” were collected and classified into positive, negative, and neutral categories. The distribution of sentiment indicates that 60% of tweets express positive perceptions, highlighting pride in Indonesia’s promotion of Pancasila values in global forums, 25% remain neutral, and 15% are negative, reflecting criticism of perceived inconsistencies between Pancasila and diplomatic practice. Model evaluation employed a confusion matrix and metrics of accuracy, precision, and recall across sentiment classes. Results demonstrate that Random Forest outperformed other models with 91% accuracy, stable precision, and recall across all classes. By comparison, SVM achieved 89% accuracy with consistent performance in high-dimensional text data, while Naïve Bayes recorded 85% accuracy but was less effective in handling class imbalance, particularly in neutral–negative distinctions. The Random Forest model explained the greatest variance in sentiment classification, confirming its strength in processing short and contextually complex texts such as tweets. Practically, these findings provide a foundation for developing a real-time sentiment monitoring system to support adaptive and participatory diplomacy. Integrating sentiment analysis into policy design enables the Ministry of Foreign Affairs to anticipate public responses, strengthen diplomacy narratives rooted in Pancasila values, and build a data-driven ecosystem for public diplomacy. This contributes to inclusive, ethical, and responsive foreign policy aligned with Indonesia’s state philosophy.
Copyrights © 2025