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 labelled articles from KINNEWS (15 websites + 5 newspapers), split into 17,014 for training and 4,254 for testing.
Lowercase, remove accents, split into words like umupira, inteko, ubuzima.
TF-IDF over words and word pairs: how important each term is to an article compared with the whole corpus.
Multinomial logistic regression, chosen after comparing Naive Bayes, SVM and logistic regression on a validation split.
Each word’s contribution (weight × TF-IDF) is shown in colour, so you can see why the model decided.
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.
| Model | Features | Test accuracy | Test macro F1 |
|---|
Darker squares on the diagonal are correct answers. Off-diagonal squares show which topics get confused with each other.
It recognises topic vocabulary; it doesn’t understand sarcasm, context or facts. A sports word in a political story can mislead it.
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.
Full articles give more evidence than a one-line headline. Labels come from each website’s own categories, which are sometimes inconsistent.
Trained on articles collected around 2020, so new names and events may be unfamiliar.
The model (≈ a few hundred KB) runs in your browser. Your text is never uploaded or stored.
Fine-tune an African multilingual transformer (e.g. AfroXLMR) and compare it with this lightweight baseline.