ML-based classification of Arabic dialects using TF-IDF and Logistic Regression
Arabic is spoken across many countries with significant dialectal variation. Understanding which dialect a text belongs to is essential for region-specific NLP applications, sentiment analysis, and content moderation — yet most NLP tools treat Arabic as a single language.
Built a machine learning pipeline to classify Arabic text into 4 dialects — Saudi (SA), Egyptian (EG), Syrian (SY), and Moroccan (MO) — using TF-IDF feature extraction and Logistic Regression, achieving 67% accuracy on a manually annotated 522-sample dataset.
67% overall accuracy on 4-class dialect classification
95% precision on Egyptian dialect — highest per-class performance
90% recall on Saudi dialect — strong identification of the majority class
Complete end-to-end NLP pipeline from raw text to classification

Dialect Distribution — Dataset class balance across 4 Arabic dialects

Confusion Matrix — Model predictions vs true dialect labels