Dataset Viewer
The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
Kenya Law Corpus
Dataset Summary
A comprehensive corpus of Kenyan legislation and case law scraped from Kenya Law — the official platform of the National Council for Law Reporting.
This dataset powers Iroh, an AI-powered Kenyan legal research assistant.
Dataset Statistics
- Total chunks: 62,000+
- Legislation: 546 Acts (every Act in the Laws of Kenya)
- Case law: Thousands of judgments from Kenyan courts
- Raw size: ~72MB (chunks), ~526MB (with embeddings)
- Languages: English (primary), Swahili (some judgments)
Data Structure
Each record contains:
{
"chunk_id": "https://new.kenyalaw.org/akn/ke/act/...##chunk0",
"text": "Full text of the chunk",
"title": "Employment Act",
"url": "https://new.kenyalaw.org/akn/ke/act/...",
"type": "legislation | case_law",
"section": "chunk_0"
}
Source
All data sourced from Kenya Law under the AKN (Akoma Ntoso) URL structure. Kenya Law publishes legislation and judgments under open access for public use.
Intended Use
- Legal AI research and RAG pipelines
- African legal NLP benchmarking
- Fine-tuning language models on Kenyan legal text
- Legal information retrieval systems
How It Was Created
- Scraped legislation and case law from new.kenyalaw.org
- Parsed HTML to clean text (JSON)
- Chunked into 800-word segments with 100-word overlap
- Embedded using
sentence-transformers/all-MiniLM-L6-v2 - Stored in ChromaDB for retrieval
Related Resources
- Iroh (Live App): https://huggingface.co/spaces/Daudipdg/iroh
- ChromaDB (with embeddings): Daudipdg/iroh-chroma-db — 526MB, ready to use with ChromaDB
- Raw chunks (this dataset): Daudipdg/kenya-law-corpus — 72MB, text only
- Built by: David Maina — Makini AI
License
CC BY-NC 4.0 — Free for research and non-commercial use. For commercial licensing contact: david@makini.tech
Citation
@dataset{maina2025kenyalaw,
author = {Maina, David},
title = {Kenya Law Corpus},
year = {2025},
publisher = {Hugging Face},
url = {https://huggingface.co/datasets/Daudipdg/kenya-law-corpus}
}
- Downloads last month
- 37