Datasets:
Luganda prose, sentences and vocabulary corpus
- Dataset: ai4ug/luganda_prose
- Author & Maintainer: Wesley Kambale (AI for Uganda Initiative)
- Project: Pearl Chat
- Organization: AI for Uganda Initiative
- Language: Luganda (
lug, ISO 639-3) - Script: Latin (
Latn) - Version:
2.0.0 - License: Apache License 2.0 (
apache-2.0)
Overview
We developed and curated ai4ug/luganda_prose as a monolingual Luganda text corpus to support language model pretraining, continual pretraining (CPT), morpheme-aware tokenizer development, and linguistic research. Version 2.0.0 contains 998,737 records comprising 32,320,315 words across sentences, paragraphs, news articles, encyclopedic passages, literary text, and vocabulary entries.
We built this corpus at the AI for Uganda Initiative in support of Pearl Chat, a native Luganda conversational language model project. Our goal is to provide a clean, large-scale collection of Luganda text for researchers and developers building language technologies for African languages.
Each record contains a text field and associated metadata describing its content type, subject domain, language, script, quality score, text length, and assigned dataset split.
Dataset summary
| Property | Value |
|---|---|
| Records | 998,737 |
| Total words | 32,320,315 |
| Language | Luganda |
| ISO 639-3 | lug |
| Script | Latin (Latn) |
| Text normalization | Unicode NFC |
| Corpus type | Monolingual text |
| Primary applications | Language model training, tokenizer development, corpus research |
| Splits | Train, validation, test |
| Split allocation | 80%, 10%, 10% |
| Author & Maintainer | Wesley Kambale (AI for Uganda Initiative) |
| Version | 2.0.0 |
| License | Apache-2.0 |
Intended uses
We designed this corpus to support research and development in Luganda language modelling and natural language processing:
- Continual pretraining: Adapting language models to Luganda vocabulary, grammatical structures, and textual patterns.
- Autoregressive language modelling: Training or adapting models to predict subsequent tokens in natural Luganda text.
- Tokenizer development: Training and evaluating subword and morpheme-aware tokenizers for Luganda and related Bantu languages.
- Masked language modelling: Supporting representation learning and masked-token prediction experiments.
- Linguistic research: Studying lexical distributions, sentence structures, noun-class concords, and register variation across Luganda text types.
- African language NLP: Advancing foundational language technologies for Luganda.
Dataset composition
Subject-domain distribution
We classified all records across subject domains covering news, society, governance, agriculture, geography, health, business, education, family, and culture:
| Domain | Records | Share |
|---|---|---|
| Grammar and news | 596,206 | 72.83% |
| General society | 48,757 | 5.96% |
| Religion and literature | 30,755 | 3.76% |
| Society and news | 30,000 | 3.66% |
| Encyclopedic knowledge | 21,114 | 2.58% |
| Civic life and law | 16,200 | 1.98% |
| Agriculture | 15,949 | 1.95% |
| Geography and tourism | 10,288 | 1.26% |
| Health and medicine | 8,385 | 1.02% |
| Business and finance | 6,723 | 0.82% |
| History, culture and kingdoms | 6,467 | 0.79% |
| Education and literacy | 6,360 | 0.78% |
| Family, parenting and youth | 6,140 | 0.75% |
| Sports and entertainment | 3,154 | 0.39% |
| Health and maternal care | 2,805 | 0.34% |
| Urban life and transport | 2,638 | 0.32% |
| Science, medicine and artisans | 2,514 | 0.31% |
| Science and technology | 1,986 | 0.24% |
| Vocabulary and grammar | 770 | 0.09% |
| Grammar and linguistics | 619 | 0.08% |
| News and society | 500 | 0.06% |
| Culture and society | 270 | 0.03% |
| Spoken conversation | 45 | 0.01% |
| Total | 818,645 | 100% |
Content-type distribution
The type field describes the structural form of each record:
| Content type | Records | Share |
|---|---|---|
sentence |
680,961 | 83.18% |
news_paragraph |
50,062 | 6.12% |
paragraph |
43,885 | 5.36% |
encyclopedic_paragraph |
21,114 | 2.58% |
news_article |
18,923 | 2.31% |
vocabulary_term |
2,430 | 0.30% |
vocabulary_definition |
770 | 0.09% |
literary_paragraph |
445 | 0.05% |
spoken_utterance |
45 | 0.01% |
| Passages and grammar explanations | 10 | <0.01% |
| Total | 818,645 | 100% |
Dataset splits and deduplication
We partitioned the corpus into training, validation, and test splits using an 80/10/10 allocation:
| Split | Records | Share | Words |
|---|---|---|---|
| Train | 835,745 | 83.7% | 28,499,997 |
| Validation | 81,380 | 8.1% | 1,889,295 |
| Test | 81,612 | 8.2% | 1,931,023 |
| Total | 998,737 | 100% | 32,320,315 |
Split assignment
In our split construction pipeline, records sharing the same six-word normalized text prefix are deterministically hashed into the same partition so closely related sentences do not straddle training and evaluation splits.
Our verification checks confirm:
- Exact text overlap across the three splits:
0.0%. - Exact cross-dataset overlap with ai4ug/luganda_qa_pairs:
0.0%.
Data format and schema
Each record contains a text sample and associated metadata:
| Field | Type | Description |
|---|---|---|
id |
String | Unique record identifier |
text |
String | Luganda sentence, paragraph, article, or lexical entry |
type |
String | Content-type classification |
split |
String | Dataset partition (train, validation, test) |
added |
String | Record date in YYYY-MM-DD format |
domain |
String | Subject-domain classification |
language |
String | Language code, lug |
script |
String | Script code, Latn |
quality_score |
Number | Quality score (>= 0.80) |
char_length |
Integer | Character count |
word_count |
Integer | Word count |
metadata |
Object | Structured record-level metadata |
Example record
{
"id": "lug_cpt_0000001",
"text": "Okusobola okukakasa amakungula amalungi, kikulu okulowooza ku mbeera y'obudde esinga obulungi ey'okusimba. Abalimi b'ensuku bangi bakizuula nti enva endiirwa ezimu zikula bulungi bwe zibeera mu bbugumu ery'amaanyi.",
"type": "paragraph",
"split": "train",
"added": "2026-10-15",
"domain": "general_society",
"language": "lug",
"script": "Latn",
"quality_score": 0.94,
"char_length": 216,
"word_count": 29,
"metadata": {
"language": "lug",
"script": "Latn",
"quality_score": 0.94,
"domain": "general_society",
"type": "paragraph",
"split": "train",
"char_length": 216,
"word_count": 29
}
}
Loading the dataset
Install the Hugging Face Datasets library:
pip install datasets
Load the corpus:
from datasets import load_dataset
dataset = load_dataset("ai4ug/luganda_prose")
print(dataset)
print(dataset["train"][0])
Access the individual splits:
train_dataset = dataset["train"]
validation_dataset = dataset["validation"]
test_dataset = dataset["test"]
Retrieve a text sample and its metadata:
example = train_dataset[0]
text = example["text"]
domain = example["domain"]
content_type = example["type"]
print(text)
print(domain)
print(content_type)
Data quality and limitations
We applied Unicode NFC normalization, HTML/boilerplate removal, PII scrubbing, Luganda language identification (LID) scoring, global deduplication, and split-level overlap checks across all records in this corpus.
When training or evaluating models on this corpus, please consider:
- Domain and content-type distribution: Sentence-level records in
grammar_and_newsform the largest share of the corpus, complemented by over134,000multi-sentence paragraphs and news articles across society, agriculture, governance, health, business, education, and culture. - Linguistic variation: Luganda usage varies across regions, generations, and registers.
- Downstream validation: Models trained on this corpus for consequential domains (such as healthcare, law, finance, or agricultural advisory) should be validated with appropriate human oversight.
Citation and attribution
If you use this dataset in research, publications, model development, or derived work, please cite it as follows:
Recommended citation
Kambale, W. (2026). Luganda Prose, Sentences and Vocabulary Corpus (Version 1.0.0) [Dataset]. AI for Uganda Initiative. Hugging Face. https://huggingface.co/datasets/ai4ug/luganda_prose
BibTeX:
@misc{kambale2026lugandaprose,
author = {Kambale, Wesley},
title = {{Luganda Prose, Sentences and Vocabulary Corpus}},
year = {2026},
publisher = {AI for Uganda Initiative},
howpublished = {\url{https://huggingface.co/datasets/ai4ug/luganda_prose}},
note = {Version 1.0.0. Monolingual Luganda corpus for language modelling, developed for the AI for Uganda Initiative}
}
Acknowledgements
We developed and curated this corpus at the AI for Uganda Initiative to advance African language technology and support Pearl Chat, a native Luganda conversational language model.
- Author: Wesley Kambale
- Initiative: AI for Uganda Initiative (
https://aiforuganda.org) - Dataset:
https://huggingface.co/datasets/ai4ug/luganda_prose - Project: Pearl Chat (
https://pearl.aiforuganda.org)
- Downloads last month
- 29