BERT-based punctuation restoration and sentence boundary detection for Yoruba β a low-resource West African language
# π Yoruba NLP β Punctuation Restoration & Sentence Boundary Detection
BERT-based NLP models for two foundational tasks in **Yoruba text processing**: punctuation restoration and sentence boundary detection. Built to address the critical gap in NLP tooling for one of Africa's most widely spoken languages.
---
## π Resources
| Resource | Link |
|---|---|
| π€ Punctuation Model | abnuel/yoruba_task1_punctuaβ¦ |
| π€ Sentence Boundary Model v1 | abnuel/yoruba_sent_boundary |
| π€ Sentence Boundary Model v2 | abnuel/yoruba_sent_boundaryβ¦ |
| π¦ Dataset | abnuel/yor_punctuation |
---
## π Why Yoruba NLP?
Yoruba is spoken by approximately **40β50 million people**, primarily in southwestern Nigeria and the diaspora. Despite this, it remains severely underrepresented in NLP research and tooling.
Two practical problems motivated this work:
1. **Unpunctuated text is ubiquitous** β social media posts, transcribed speech, and scanned documents in Yoruba typically lack consistent punctuation, which breaks downstream NLP pipelines.
2. **Sentence segmentation is unreliable** β standard sentence tokenizers trained on English (or even other African languages) perform poorly on Yoruba due to its tonal structure and morphological complexity.
This project builds the foundational preprocessing tools needed to enable higher-level Yoruba NLP tasks.
---
## ποΈ Project Structure
```
yoruba-nlp/
βββ README.md
βββ requirements.txt
βββ notebooks/
β βββ 01_data_exploration.ipynb # Dataset analysis and statistics
β βββ 02_punctuation_finetuning.ipynb # Punctuation restoration training
β βββ 03_sentence_boundary_finetuning.ipynb # SBD training
βββ src/
β βββ train.py # Token classification training script
β βββ inference.py # Inference utilities for both tasks
β βββ evaluate.py # F1, precision, recall per label
β βββ preprocess.py # Data preprocessing and label β¦