A Controlled Evaluation of Hybrid TF-IDF Representations and Classical Machine Learning for Abusive-Language Detection
Keywords:
abusive-language detection; TF-IDF; character n-grams; preprocessing ablation; classical machine learning; ensemble learning; macro-F1; stratified cross-validationAbstract
Abusive-language detection in short social-media text is challenging because harmful expressions are informal, context-dependent, and substantially less frequent than non-abusive content. This study presents a controlled empirical evaluation of preprocessing, TF-IDF representations, classical classifiers, and voting ensembles for binary abusive-language detection. A corpus of 20,114 labeled English social-media texts contains 2,533 abusive and 17,581 non-abusive instances. The experiments use stratified five-fold cross-validation and evaluate six preprocessing alternatives, eight feature configurations, six classifiers, class-weight sensitivity, numerical-feature scaling, and hard-voting ensembles. Lemmatization followed by hybrid word- and character-level TF-IDF gives the strongest sequentially selected representation. Random Forest achieves macro-F1 = 0.8893 ± 0.0091, accuracy = 0.9531 ± 0.0042, and abusive-class recall = 0.7706 ± 0.0129. Logistic Regression provides higher abusive recall (0.8160) and substantially lower prediction time. The best voting ensemble, combining SVM, RF, and LR, reaches macro-F1 = 0.8762 and therefore does not improve on the selected RF pipeline. Repeated five-fold evaluation gives RF macro-F1 = 0.8883 ± 0.0064. The results show that the hybrid word- and character-level representation gives the strongest tested feature configuration, while the tested handcrafted feature additions and voting ensembles do not improve macro-F1 over the selected Random Forest pipeline.





