N-grams vs. Neural Models for Low-Resource African Languages: When to Switch?
Abstract
Practitioners building NLP tools for low-resource African languages face a critical yet understudied decision: should they use simple N-gram-based approaches or invest in neural models given limited training data? Neural models' advantage over N-grams diminishes when training data is scarce. We present a systematic comparison across three African-language benchmarks spanning two task types and up to ten typologically diverse languages across four language families: MasakhaNEWS (news topic classification), AfriSenti (tweet sentiment classification), and SIB-200 (topic classification, six-class subset). At training-set sizes from 100 examples up to each benchmark's full split, we compare N-gram features with classical classifiers, fine-tuned multilingual pretrained models (XLM-R, AfroXLMR), small Transformers trained from scratch, and a hybrid interpolation of N-gram and neural predictions. On MasakhaNEWS we identify three crossover patterns---immediate neural dominance, persistent N-gram competitiveness, and complex crossover dynamics---driven primarily by a language's cumulative pretraining representation rather than its language family or morphology. These patterns recur on AfriSenti and SIB-200: the same poorly-pretrained languages (e.g., Oromo, Luganda) remain N-gram-competitive or superior under a different task and label set, while from-scratch Transformers underperform both alternatives at nearly every scale on all three benchmarks. Hybrid interpolation of (Platt-scaled) N-gram and neural probabilities numerically improves over both standalone models for a majority of languages on every benchmark, at no additional training cost, though significance varies by benchmark. Character 3-to-5-gram features with a linear SVM provide a robust, typology-agnostic N-gram baseline throughout, yielding practical, task-general guidelines for model selection in low-resource settings.