Amharic Named Entity Recognition using AfroXLM-R
# Amharic Named Entity Recognition
An AI pipeline that classifies customer complaints, extracts structured ticket data, generates empathetic responses, and logs everything to a searchable dashboard.
---
## π Live Demo
π Try it on Hugging Face Spaces
---
## What It Does
1. Accepts any Amharic sentence as input
2. Tokenizes text using AfroXLM-R subword tokenizer
3. Predicts named entity tags for each token
4. Highlights entities with color-coded chips:
π΄ PER β Person names (α°α)
π’ LOC β Locations (α¦α³)
π΅ ORG β Organizations (α΅αα
α΅)
π‘ DATE β Dates (αα)
5. Displays entity summary cards with counts
---
## Screenshots
| | |
|:---:|:---:|
| | |
| *App Interface* | *Person & Location Detection* |
| | |
| *Organization & Date Detection* | *Entity Summary Cards* |
---
## Tech Stack
- Python 3.10
- PyTorch β deep learning framework
- HuggingFace Transformers β AfroXLM-R model
- AfroXLM-R-base (Davlan/afro-xlmr-base) β pretrained on 17 African languages including Amharic
- MasakhaNER 1.0 β Amharic NER dataset
- Gradio β web interface
- seqeval β NER evaluation metrics
---
## Architecture
```
amharic-ner/
β
βββ app.py # Gradio web interface
βββ requirements.txt # Dependencies
βββ images/ # Screenshots
β βββ screenshot1.png
β βββ screenshot2.png
β βββ screenshot3.png
β βββ screenshot4.png
βββ saved_model/ # Trained model (hosted on HuggingFace)
βββ config.json
βββ pytorch_model.bin
βββ tokenizer files
βββ ner_config.json
```
---
## Evaluation
```
(AfroXLM-R-base): 0.76
```
---
## Running Locally
```bash
# Clone the repository
git clone
github.com
cd amharic-ner
# Install dependencies
pip install -r requirements.txt
# Run the app
python app.py
```