This study aims to develop a classification model for Indonesian news texts across nine categories using the Bidirectional Long Short-Term Memory (Bi-LSTM) method. Unlike previous studies that predominantly utilized balanced datasets or focused on binary classification, this research evaluates the model's robustness under extreme real-world class imbalance, where the disparity in data volume between classes reaches over thirteen-fold. The research methodology encompasses text preprocessing (case folding, punctuation removal, and Sastrawi stemming), tokenization, padding, and dataset splitting at an 80:20 ratio. The model architecture integrates an embedding layer, a Bi-LSTM layer, a dropout layer, and a dense layer, which are optimized using a cost-sensitive class weight technique and the Adam optimizer. Experimental results demonstrate that the model achieved an accuracy of 0.85, with weighted average precision, recall, and F1-score values all at 0.85. The primary advantage of this method lies in its bidirectional feature extraction capability (forward and backward), which proves reliable in mitigating majority class bias and reducing semantic ambiguity within minority categories. The scientific contribution of this study provides empirical evidence and a comprehensive reference regarding the effectiveness of bidirectional contextual understanding in maintaining the performance stability of multi-class text classification within non-ideal, real-world data landscapes.
Copyrights © 2026