You need to agree to share your contact information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

YAML Metadata Warning:The task_categories "language-modeling" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other

LughaGen Multilingual Kenyan Language Corpus

Dataset Description

LughaGen is a curated multilingual corpus for four Kenyan and East African languages: Swahili (sw), Kikuyu (ki), Kamba (kam), and Luo/Dholuo (luo). It was developed as part of the LughaGen research initiative under JHUB Africa, funded by NVIDIA, with the goal of building large language models for low-resource African languages.

This dataset aggregates, cleans, and documents text from multiple secondary sources, supplemented with synthetically generated and human-curated data for underrepresented languages. It is intended for continual pretraining, language modeling, and NLP research on low-resource African languages.

Repository: LughaGen/lughaGen-corpus Funded by: NVIDIA (via JHUB Africa) Point of Contact: Nicolette Nkirote (nicolette.nkirote@students.jkuat.ac.ke)


Dataset Summary by Language

Language ISO Secondary Rows (post-AfroLID) Synthetic Rows Total Rows Data Types
Swahili sw 10,950,047 334,962 (145,128 + 189,834 Sheng) 11,285,009 Secondary + Synthetic + Sheng
Kikuyu ki 93,846 132,895 226,741 Secondary + Synthetic
Kamba kam 36,891 126,864 163,755 Secondary + Synthetic
Luo (Dholuo) luo 325,370 137,328 (136,328 + 1,000 Native) 462,698 Secondary + Native Speaker-Informed Synthetic

Data Sources & Contributors

Data Assembly & Cleaning – Nicolette Nkirote
Synthetic Data Generation – Derek Mayabi
Sheng/Code-switching Synthetic Data – Innocent Baraka
Luo Human-informed Synthetic Data – Godfrey Koros

Synthetic Data Generation Pipelines

Tier 1 & Tier 2 (Derek Mayabi)

  • Model: LLaMA 3.1 70B (Tier 1) and 8B (Tier 2)
  • Method: Paraphrastic rewriting of cleaned seed sentences using structured prompts
  • All records contain rich metadata (tier, quality, generator, perplexity, etc.)

Tier 3 – Sheng/Code-switching (Innocent Baraka)
Rule-based insertion of Sheng lexicon into Swahili–English sentences with manual quality control.

Native Speaker-Informed Luo Synthesis (Godfrey Koros)
Godfrey, with input from a native Dholuo speaker, created seed vocabulary and phrases that were underrepresented in existing corpora. This subset underwent human evaluation and represents an original linguistic contribution.

All synthetic records are tagged with source_type: "synthetic" or source_type: "human_curated_synthetic".


Source Datasets & Provenance

Swahili (sw)

Dataset Source License Size Notes
CiviVox-Swahili-text-corpus-v2.0 Adeptschneider/HuggingFace See AfriBERTa 1.54M rows Derived from AfriBERTa Corpus
Swahili-Corpus-Dataset ngusadeep/HuggingFace Apache 2.0 / CC BY 4.0 ~1.69M rows Originally published on Mendeley Data by Masasi & Masua (2024)
Leipzig Swahili Corpora (×9) Leipzig Corpora Collection CC BY Various News and community text; multiple domains
OPUS Swahili subsets OPUS Various open Various ParaCrawl, WikiMatrix, NLLB-v1 subsets
Sheng Mental Health Dataset Zenodo See Zenodo record Sheng text; used to build Sheng lexicon for code-switching synthesis
Sheng Bible shengilia.blogspot.com See site terms Sheng scripture text; used for lexicon construction
X (Twitter) Sheng Tweets Scraped from X/Twitter See X ToS Sheng social media text; used for lexicon construction
kikuyu-swahili_sentence-pairs michsethowusu/HuggingFace See NLLB-v1 219,559 Swahili side extracted
kamba-swahili_sentence-pairs michsethowusu/HuggingFace See NLLB-v1 223,368 Swahili side extracted

Kikuyu (ki)

Dataset Source License Size Notes
kikuyu_monolingual_sentences thirtyninetythree/HuggingFace Unknown (see source) 118,887 (deduped) Aggregated from 38 parallel datasets
kikuyu-emotions-corpus michsethowusu/HuggingFace MIT 34,696 rows Emotion-labeled; text extracted only
kikuyu-[lang]_sentence-pairs (×multiple) michsethowusu/HuggingFace CC BY 4.0 (NLLB-v1) Various Kikuyu side extracted from parallel corpora
Kikuyu Bible (KikGKY) STEP Bible CC BY-SA 4.0 121,894 Biblica® Open Kikuyu Holy Word of God™, © 2013 Biblica, Inc. ShareAlike clause applies — drives overall dataset license to CC BY-SA 4.0
OPUS Kikuyu subsets OPUS Various open Various ParaCrawl, WikiMatrix subsets

Kamba (kam)

Dataset Source License Size Notes
kamba-emotions-corpus michsethowusu/HuggingFace MIT 26,394 rows Emotion-labeled; text extracted only
kamba-[lang]_sentence-pairs (×multiple) michsethowusu/HuggingFace CC BY 4.0 (NLLB-v1) Various Kamba side extracted from parallel corpora
OPUS Kamba subsets OPUS Various open Various ParaCrawl, WikiMatrix subsets

Luo / Dholuo (luo)

Dataset Source License Size Notes
Lacuna Fund Datasets (×6) Lacuna Fund Datasets CC-BY 4.0 glotcc_luo (1,641), kencorpus_luo (113,198), smol_luo (863), thinkkenya_luo (29,292), thiomi_luo (6,816), walengwa_luo (29,306) News and community text
Ramogi FM Luo Text Pogayo/Verrah — GitHub See repo license 1,421 News articles (Jan 2018 – Mar 2021)
english-dholuo_sentence-pairs_mt560 michsethowusu/HuggingFace CC BY 4.0 1,045,439 OPUS MT560; Dholuo side extracted
Parallel Corpora for Dholuo waleghwa/Zenodo See Zenodo record 29,306 Dholuo-Kiswahili; Lacuna Fund-funded; curators: Mbogho et al.
OPUS Luo subsets OPUS Various open Various ParaCrawl, WikiMatrix subsets
Flores200 Luo Dataset Muennighoff/flores200 CC BY-SA 4.0 2,009 Text extracted only
Human-curated Luo vocabulary Native speaker elicitation CC BY-SA 4.0 (this release) 1,000 Curated by Godfrey Koros; see Native Speaker-Informed Luo Synthesis

Synthetic Data

All synthetic data is clearly marked with a source_type: synthetic field in the JSONL records. Three distinct synthetic generation pipelines were used across the team, described below.


Tier 1 — Low-Resource Language Synthesis (Kikuyu, Kamba, Luo)

Contributor: Derek Mayabi Model: LLaMA 3.1 70B Instruct (INT4 / AWQ-quantized) Target: 100,000 samples per language Infrastructure: 6 × NVIDIA A100 GPUs (tensor parallelism) Inference engine: vLLM (batched generation, ~100 samples per batch)

Methodology: The cleaned authentic JSONL corpora (cleaned_kikuyu.jsonl, etc.) were used as seed input. Language-specific prompt templates instructed the model to act as a fluent native speaker and generate 2 paraphrastic variations of each input sentence, returning strict JSON. Rationale: low-resource languages require the strongest available model to produce fluent, native-like output.

Output format: JSONL, one record per generated sample.


Tier 2 — Swahili Synthesis (Speed-Optimized)

Contributor: Derek Mayabi Model: LLaMA 3.1 8B (BF16) Target: 100,000 samples Infrastructure: 2 × NVIDIA A100 GPUs (CUDA_VISIBLE_DEVICES=6,7) Inference engine: vLLM

Methodology: Same prompting approach as Tier 1 but optimised for throughput. Rationale: Swahili has substantial real data in this corpus; synthesis here prioritises speed and domain diversity rather than maximal fluency. Quality target: ~7/10.


Tier 3 — Sheng / Code-Switching Synthesis (Swahili–English–Sheng)

Contributor: Innocent Baraka

Methodology: Clean English–Swahili parallel sentences were collected and preprocessed. Sheng words and phrases from a curated Sheng lexicon (see Sheng source datasets below) were inserted into sentences using controlled replacement rules at word, phrase, and sentence levels. The process produced mixed English–Swahili–Sheng sentences while preserving meaning, grammatical flow, and natural code-switching patterns. Quality controls applied: duplicate removal, similarity filtering, POS-based replacement constraints, and manual review.

Purpose: To support training of a Kenyan code-switching language model capturing natural Sheng usage patterns.


Native Speaker-Informed Luo Synthesis

Contributors: Godfrey Koros Language expertise: Native proficiency in Dholuo

Methodology: Contributor drew on his own Dholuo vocabulary knowledge to compile seed vocabulary and phrases not well-represented in existing corpora. This native speaker input was used to generate synthetic text capturing linguistic patterns absent from the secondary sources.

  • Consent: The contributor have provided explicit consent for this data to be published under CC BY-SA 4.0

This subset represents an original linguistic contribution by the LughaGen team and is released under CC BY-SA 4.0.


Data Processing

The following processing steps were applied to all source data before inclusion:

1. Deduplication

Exact deduplication was performed at the sentence/line level using hash-based matching. This resulted in significant reduction for some languages — notably Kikuyu and Kamba — due to overlap across parallel corpora sharing the same upstream sources (NLLB-v1).

2. Language Purity Filtering

Language identification filtering was applied using AfroLID for the authentic/secondary text and GLOTLID for the synthetic text to ensure each file contains only the target language. Key finding: Kamba data showed reduced reliability due to lexical overlap with Kikuyu, which is documented as a limitation (see below).

3. Synthetic Data Augmentation

Three synthetic generation pipelines were applied — see the Synthetic Data section above for full methodology. In summary: LLaMA 3.1 70B (Tier 1) for Kikuyu, Kamba, and Luo; LLaMA 3.1 8B (Tier 2) for Swahili; rule-based Sheng code-switching pipeline (Tier 3) using a curated Sheng lexicon; and native speaker-informed Luo synthesis Godfrey Koros.


Data Format Standardization

All data was normalized to JSONL format with one record per line. All records share the following base schema:

{
  "text":        "...",
  "language":    ".....",
  "source":      "*name*_synthetic",
  "source_type": "synthetic",
  "domain":      "....."
}

source_type values: secondary | synthetic | native_speaker_synthetic

Tier 1 and Tier 2 synthetic records (Derek Mayabi's pipeline) additionally carry extended audit metadata fields: quality, perplexity, generator, audit_glotlid_top1, audit_glotlid_top1_p, audit_decision, and others. These are preserved in full and can be used for downstream confidence-based filtering.

Ethical Considerations

Permissions and Licensing

All secondary datasets used in this corpus were obtained from public repositories and are used in accordance with their respective licenses. Datasets derived from NLLB-v1 (META/OPUS) are governed by CC BY 4.0. Leipzig Corpora data is released under CC BY. The Kikuyu Bible (KikGKY) is licensed under CC BY-SA 4.0 by Biblica, Inc. — the ShareAlike clause of this source is the reason this overall dataset is released under CC BY-SA 4.0. Full copyright notice: "Biblica® Open Kikuyu Holy Word of God™, Copyright © 2013 by Biblica, Inc."

Native Speaker Data

The human-curated Luo vocabulary data was collected with the explicit informed consent of both contributors. Both contributors are adult native speakers of Dholuo who participated voluntarily and understood the data would be published publicly under an open license.

Cultural Sensitivity

This dataset represents the linguistic heritage of Kenyan communities — Kikuyu, Kamba, Luo, and Swahili-speaking peoples. We have handled this data with care and documented all sources transparently. We acknowledge that low-resource language datasets carry responsibility to the communities whose languages they represent.

No PII

The corpus was reviewed and does not knowingly contain personally identifiable information. It consists of publicly published text (news, community corpora, translations) and controlled elicited vocabulary.

No Harmful Content

The corpus does not knowingly contain hate speech, discriminatory content, or content harmful to the represented communities.

Known Data Quality Issues

  • Kamba language purity: AfroLID/GlotLID filtering showed reduced reliability for Kamba due to lexical overlap with Kikuyu. Kamba data should be used with awareness of potential cross-language contamination.
  • STEPBIBLE license: The Kikuyu Bible text is subject to STEP Bible's terms of use. Users intending to redistribute should independently verify compliance.
  • One Luo dataset was found to contain French-language contamination during quality review; this was filtered out prior to inclusion.

Intended Use

This dataset is intended for:

  • Continual pretraining of large language models on Kenyan/East African languages
  • Language modeling and tokenizer training
  • NLP research on low-resource African languages
  • Evaluation of corpus quality interventions (deduplication, language filtering, synthetic augmentation)

Not intended for: Commercial deployment without independent review of license compatibility across all constituent datasets.


How to Load

from datasets import load_dataset

# Load full corpus
ds = load_dataset("LughaGen-Organization/LughaGen-Multilingual-African-Corpus")

# Load a specific language config
swahili = load_dataset("LughaGen-Organization/LughaGen-Multilingual-African-Corpus", "swahili")
kikuyu  = load_dataset("LughaGen-Organization/LughaGen-Multilingual-African-Corpus", "kikuyu")
kamba   = load_dataset("LughaGen-Organization/LughaGen-Multilingual-African-Corpus", "kamba")
luo     = load_dataset("LughaGen-Organization/LughaGen-Multilingual-African-Corpus", "luo")
sheng   = load_dataset("LughaGen-Organization/LughaGen-Multilingual-African-Corpus", "sheng")

# Filter by language manually if needed
luo_only = ds.filter(lambda x: x["language"] == "luo")

Smoke Test / Validation

from datasets import load_dataset

ds = load_dataset("LughaGen-Organization/LughaGen-Multilingual-African-Corpus")

# Basic validation
for split in ds:
    df = ds[split].to_pandas()
    print(f"\n--- {split} ---")
    print(f"Total records : {len(df):,}")
    print(f"Languages     : {df['language'].value_counts().to_dict()}")
    print(f"Source types  : {df['source_type'].value_counts().to_dict()}")
    print(f"Empty text    : {df['text'].str.strip().eq('').sum()}")
    print(f"Sample record :")
    print(df[['text','language','source_type']].sample(1).to_string())

Citation

If you use this dataset, please cite:

@dataset{lughaGen_corpus_2025,
  title     = {LughaGen Multilingual African Language Corpus},
  author    = {[Your Name] and [Team members]},
  year      = {2025},
  publisher = {Hugging Face},
  url       = {https://huggingface.co/datasets/LughaGen/lughaGen-corpus},
  note      = {NVIDIA-funded research initiative under JHUB Africa, JKUAT}
}

Please also cite the original source datasets as listed in the provenance table above. Key citations:

Leipzig Corpora Collection:

@inproceedings{eckart2012leipzig,
  title={Statistical Corpus and Language Comparison on Comparable Corpora},
  author={Eckart, Thomas and Quasthoff, Uwe},
  booktitle={Building and Using Comparable Corpora},
  publisher={Springer-Verlag Berlin Heidelberg},
  year={2013},
  isbn={978-3-642-20128-8}
}

OPUS / Tiedemann:

@inproceedings{tiedemann2012opus,
  title={Parallel Data, Tools and Interfaces in OPUS},
  author={Tiedemann, J{\"o}rg},
  booktitle={Proceedings of LREC 2012},
  year={2012}
}

Swahili Corpus (Mendeley):

@dataset{masasi2024swahili,
  title={Swahili Corpus},
  author={Masasi, Noel and Masua, Bernard},
  year={2024},
  publisher={Mendeley Data},
  version={2},
  doi={10.17632/d4yhn5b9n6.2}
}

NLLB / michsethowusu parallel pairs: Based on NLLB-v1 via OPUS. Cite per OPUS/NLLB guidelines.


Acknowledgments

This dataset was developed under the LughaGen research initiative at JHUB Africa, JKUAT, funded by NVIDIA. We acknowledge the creators of all constituent datasets — their open data contributions make this work possible.

We particularly acknowledge the communities whose languages are represented in this corpus: Kikuyu, Kamba, Luo, and Swahili-speaking peoples of Kenya and East Africa.

Downloads last month
42