99%-accurate text classifier for Oromo, Somali, and Swahili — low-resource , African NLP
# Language Detection — Oromo, Somali & Swahili
> A text classifier for three East African languages achieving **99% accuracy**, built to address the scarcity of NLP tooling for low-resource African languages.
---
## Overview
Most language detection tools perform well on European languages but fail on low-resource African languages due to a lack of training data and linguistic research. This project targets three East African languages — **Oromo**, **Somali**, and **Swahili** — building a classifier that can be used as a pre-processing step in downstream NLP pipelines.
---
## Results
| Metric | Score |
|--------|-------|
| Accuracy | **99%** |
| Languages | Oromo, Somali, Swahili |
---
## Stack
---
## Usage
### Run the notebook
```bash
git clone
github.com
cd Language_Detection
pip install scikit-learn jupyter
jupyter notebook Language_detection.ipynb
```
### Use the saved model
```python
import pickle
with open("detection_model.pkl", "rb") as f:
model = pickle.load(f)
texts = ["Akkam jirta?", "Sidee tahay?", "Habari yako?"]
predictions = model.predict(texts)
print(predictions) # ['oromo', 'somali', 'swahili']
```
---
## Files
| File | Description |
|------|-------------|
| `Language_detection.ipynb` | Full training pipeline and evaluation |
| `detection_model.pkl` | Serialized trained model |
---
## Context
Oromo, Somali, and Swahili collectively have hundreds of millions of speakers yet remain significantly under-represented in mainstream NLP research. This project is part of a broader interest in building language tools for under-resourced communities.
---
## Related Work
- Amharic ATS — IEEE 2023
- Ho Language ATS — IEEE 2023