lk-news-topic-classifier
Sri Lankan news classifier
2 min readupdated
The model performs automatic categorization of news articles in three languages: English, Sinhala, and Tamil. It sorts articles into nine predefined topics (politics, economy, crime, weather and disasters, health, sports, education, international news, and others). It is built on the compact intfloat/multilingual-e5-small language model (a text encoder with 118 million parameters), fine-tuned on Sri Lankan media materials. The tool targets developers building news aggregators or analytical dashboards for regional content.
Key features
- Multilingual: support for English, Sinhala, and Tamil languages.
- Nine categories: coverage of key news agenda topics.
- Honest benchmarks: the author openly notes that a simple classifier based on TF-IDF and logistic regression works slightly more accurately on the test set.
- Compactness: the model size is only 118M parameters, allowing it to run on modest hardware.
What you can do
- Apply it to build a news aggregator or media monitoring tool for Sri Lanka.
- Test text classification in Sinhala or Tamil.
- Integrate the model into a data processing pipeline using the
transformerslibrary.
Example
from transformers import pipeline
clf = pipeline("text-classification", model="nipuna02/lk-news-topic-classifier")
clf("ශ්රී ලංකා මහ බැංකුව ප්රතිපත්ති පොලී අනුපාත නොවෙනස්ව තබයි")Read more
DetailsBenchmarks: Macro-F1 on a test set of 450 articles is 0.715 (compared to 0.748 for the classical TF-IDF baseline).
Training: up to 20,176 articles labeled by URLs and keywords were used; training took place on a MacBook Air M1.
Limitations: the model is trained only on Sri Lankan news from 2024–2026, assigns exactly one label per article, and is not intended for content pre-moderation.










Comments