Security-Oriented Text Classification Using Optimized Naive Bayes in C++: A Lightweight Approach for Big Data Analytics (Journal of the College of Basic Education, 2025)
With the increasing volume of unstructured text in cybersecurity environments, accurate and efficient classification of malicious content has become a major challenge. This study addresses the problem by designing and implementing a lightweight Naive Bayes classifier using C++ to detect and classify malicious versus benign software-related text messages. The proposed solution focuses on resource-constrained environments, ensuring secure processing and minimal memory overhead. A synthetic dataset containing 60 labeled messages (30 malicious, 30 benign) was used for testing. The classifier achieved 90% overall accuracy, 86.7% sensitivity, and 93.3% specificity. Performance was validated through confusion matrices, precision-recall analysis, and per-class evaluation. The findings confirm that Naive Bayes is a viable lightweight method for real-time text classification in security-sensitive big data applications. Future enhancements may include NLP integration, hybrid classifiers, and privacy-preserving machine learning techniques.