A Comparative Study of Arabic Text Classification using k-NN, SVM, and Naive Bayes (Comprehensive Journal of Science, 2025)
Arabic text classification is a critical task in natural language processing, yet it remains challenging due to the language’s morphological complexity and the scarcity of annotated datasets. This study presents a comparative evaluation of three classical machine learning algorithms—k-Nearest Neighbors (k-NN), Support Vector Machine (SVM), and Naive Bayes—for multi-category Arabic text classification. We employ a curated dataset of 700 articles from Al-Hayat newspaper, evenly distributed across seven categories: Technology, Economy, Sports, General News, Science, Culture, and Politics. The texts, written in Modern Standard Arabic, undergo standard preprocessing including normalization, tokenization, stopword removal, and light stemming., and models are evaluated based on accuracy, precision, recall, and F1-score. Experimental results show that SVM achieves the highest performance with 89.3% accuracy and 88.8% F1-score, followed by Naive Bayes (86.4% accuracy) and k-NN (79.3% accuracy). The findings confirm SVM as the most effective classical model for this task, while Naive Bayes offers a computationally efficient alternative. k-NN underperforms, particularly in high-dimensional spaces. This work provides a reproducible benchmark for Arabic text classification and highlights the importance of preprocessing and feature representation. The results serve as a foundation for future research, including the integration of deep learning models and expansion to dialectal Arabic content..
Keywords: Text Classification, KNN, SVM, Naive Bayes, TF-IDF, Machine Learning