The approach

From corpus to verdict

The problem is regional and language-shaped, so the build is too. Six stages turn public datasets, real African SMS and a honeynet capture into one classifier you can call live. Follow the rail down.

Stage 01

Sources

Eight sources are pooled: public corpora (UCI SMS, the Nazario phishing/419 emails, Mendeley SMS-phishing, MOZ-Smishing in Portuguese), real African SMS from Nigeria and Tanzania, and 1,099 messages captured by the CMU-Africa smishing honeynet.

Stage 02

Normalise

Everything is mapped to one schema, schema-validated, exact- and near-deduplicated (Jaccard size-banding), and length-filtered: 10,722 labelled messages across English, Portuguese, Swahili and Kinyarwanda.

Stage 03

Label

Each source's labels are relabelled into the four classes with rule-assisted passes and manual review. The labels stay source- and rule-based; a Cohen's κ inter-rater study is scoped as future work.

Stage 04

Features

Messages become TF-IDF vectors: word 1–2 grams, sublinear term frequency, accent-stripped, a 30k vocabulary.

Stage 05

Train & compare

Six models are scored on the same stratified held-out split: TF-IDF baselines, multilingual e5 embeddings, and ensembles. Plain TF-IDF + Logistic Regression wins, and retrained with the honeynet capture it reaches macro-F1 0.932 on the hardest test.

Stage 06

Serve

The fitted pipelines ship behind FastAPI endpoints on Hugging Face Spaces, powering the Rethicsec Android app, the live demo here, and the model playground.

Why a classical model, on purpose

A large language model was the obvious reach. For the baseline the dissertation argues the opposite, and keeps the LLM as a measured comparison in future work.

Interpretable

A linear model over TF-IDF features can be read term by term. For a fraud tool, being able to say why a message was flagged matters as much as the verdict itself.

Robust on a small corpus

Verified scam data is scarce. A classical model learns a stable boundary from a few thousand examples, where a heavier model would overfit and memorise.

Cheap to serve

The whole pipeline runs on free-tier infrastructure and answers in milliseconds. Reach across low-cost devices matters more than a fraction of a point.