AI · Natural language processing · Kinyarwanda

Soma AI

Ireba icyo inkuru ivuga. It reads Kinyarwanda news and tells you what it’s about.

A machine-learning model trained on 21,268 real articles from 20 Rwandan news sources. Paste any Kinyarwanda news text and Soma AI predicts its topic, and shows which words made it decide. It runs entirely in your browser: nothing you type is sent anywhere.

📰 21,268 articles 🏷️ 14 topics 🎯 — test accuracy 🔒 Runs offline in your browser
Try it

Gerageza Soma AI

Loading model…
Ingero · real headlines from the test set (never seen in training)
Pick an example or paste some Kinyarwanda news, then press Soma.
How it works

From Rwandan newsrooms to your browser

Data

21,268 labelled articles from KINNEWS (15 websites + 5 newspapers), split into 17,014 for training and 4,254 for testing.

Clean

Lowercase, remove accents, split into words like umupira, inteko, ubuzima.

Features

TF-IDF over words and word pairs: how important each term is to an article compared with the whole corpus.

Model

Multinomial logistic regression, chosen after comparing Naive Bayes, SVM and logistic regression on a validation split.

Explain

Each word’s contribution (weight × TF-IDF) is shown in colour, so you can see why the model decided.

Results

Two tests, two honest numbers

—Accuracy · known news sites
—Accuracy · brand-new news sites
—Macro F1 · new sites
—Words & pairs learned

The finding: domain shift

The official KINNEWS test articles come from different news websites than the training articles. On new articles from sites it learned from, Soma AI is right about 9 times in 10; on sites it has never seen, about 7 in 10. Each newsroom writes and labels topics differently (one site’s “culture” is another’s “history”), so generalising across sources is the real challenge, and a common problem for AI in the real world.

Training sources
Test sources (unseen)
ModelFeaturesTest accuracyTest macro F1

F1 score per topic

Confusion matrix (rows = true topic, columns = predicted)

Darker squares on the diagonal are correct answers. Off-diagonal squares show which topics get confused with each other.

Honest limitations

What Soma AI can’t do (yet)

Word patterns, not meaning

It recognises topic vocabulary; it doesn’t understand sarcasm, context or facts. A sports word in a political story can mislead it.

Uneven data

Some topics had very few training articles (e.g. environment: 38, fashion: 54), and the test set has a different topic mix, so those classes are harder.

Short text is harder

Full articles give more evidence than a one-line headline. Labels come from each website’s own categories, which are sometimes inconsistent.

2020 news

Trained on articles collected around 2020, so new names and events may be unfamiliar.

Privacy first

The model (≈ a few hundred KB) runs in your browser. Your text is never uploaded or stored.

Next steps

Fine-tune an African multilingual transformer (e.g. AfroXLMR) and compare it with this lightweight baseline.