# π°πͺ Dholuo POS Tagger β AfroXLM-R (KenCorpus Fine-tuning)
This repository contains the **training code, preprocessing pipeline, and documentation** for a **Dholuo (Luo) Part-of-Speech (POS) tagging model**, fine-tuned from **AfroXLM-R** using **KenCorpus** data.
The final trained model is published on Hugging Face:
π **Hugging Face Model:**
Omballa/dholuo-pos-afroxlmrβ¦
This work follows **Masakhane-aligned practices** for low-resource African NLP.
---
## β¨ Overview
- **Task:** POS tagging (token classification)
- **Language:** Dholuo (Luo)
- **Base Model:** `masakhane/luo-pos-tagger-afroxlmr`
- **Architecture:** AfroXLM-R
- **Training Data:** KenCorpus (Dholuo)
- **Framework:** Hugging Face Transformers
- **Output:** UPOS / Masakhane-aligned POS tags
---
## π Repository Structure
```text
.
βββ data/
β βββ data_upos.csv
β βββ README.md # Detailed data documentation & preprocessing
βββ training/
β βββ train.py # Training script
β βββ evaluate.py # Evaluation utilities
β βββ utils.py
βββ notebooks/
β βββ exploration.ipynb
βββ README.md # This file
βββ LICENSE
````
> π **Important:**
> See `data/README.md` for full details on **KenCorpus cleaning**, **POS tag alignment**, and **data limitations**.
---
## π Dataset
### KenCorpus (Dholuo)
The training data originates from **KenCorpus**, a Kenyan language corpus designed to support NLP research for low-resource languages.
* **Language:** Dholuo
* **Annotations:** POS tags
* **Characteristics:**
* Fine-grained and composite POS tags
* Corpus-specific labels
* Token-level annotation
To ensure compatibility with transformer-based models and Masakhane tooling, the data was **cleaned and normalized** into a **Masakhane / Universal POS (UPOS)** label set.
π Full details are documented in:
β‘οΈ `data/README.md`
---
## π§Ή Preprocessing Summary
The preprocessing pipeline includes:
* Token and tag normalization
* Removal of malfor β¦