The advancement of information technology drives digital transformation, enhancing efficiency but also presenting challenges such as data management and privacy risks due to cybercrime. The Electronic Information and Transactions Law (UU ITE) serves as an essential legal foundation for protecting data and ensuring digital justice. This study employs the K-Nearest Neighbor (KNN) algorithm to classify UU ITE violations based on chronology texts, focusing on Articles 27 and 28 from 323 violation cases. The process includes text preprocessing, weighting, modeling, and evaluation. To address data imbalance, SMOTE (Synthetic Minority Oversampling Technique) and PCA (Principal Component Analysis) were applied. Hyperparameter optimization using GridSearchCV improved model performance. Initial accuracy of 57% increased to 75% after applying SMOTE and PCA, with a final result of 82.62%, a macro average F1-score of 0.82, and a weighted average F1-score of 0.83. The model showed the best performance on "Article 28 Paragraph 2" and the lowest on "Article 27 Paragraph 1". This study demonstrates the potential of Text Mining in supporting digital law enforcement.
Copyrights © 2026