File size: 1,899 Bytes
623a843
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---

language:
- sw
- en
- swh
license: apache-2.0
tags:
- kenya
- code-switching
- sheng
- swahili
- pretraining
- 1m-corpus
- language-modeling
size_categories:
- 1M<n<10M
---


# 🇰🇪 Kenyan Code-Switching Pretraining Corpus (1,000,000 Sentences / 16.99M Words)

The largest standardized, rule-audited monolingual pretraining corpus for Kenyan Code-Switching (Sheng / Technical Swahili-English Blend).

## Corpus Statistics

- **Total Sentences:** 1,000,000 sentences
- **Total Word Tokens:** 16,990,653 words
- **Average Sentence Length:** 16.99 words (multi-clause explanatory syntax)
- **Linguistic Audit Score:** 100.0000% compliance across all 20 Master Blueprint rules
- **Raw Text Size:** 113.3 MB (`.txt`)
- **Metadata JSONL Size:** 203.6 MB (`.jsonl`)

## Domains Represented

1. **Engineering & Infrastructure:** Structural analysis, shear stress, electrical transformers, hydraulics, concrete rebar.
2. **Finance & FinTech:** M-Pesa, SACCOs, Central Bank of Kenya inflation, collateral liquidation, loan underwriting.
3. **Tech & Software Systems:** Microservices, Redis caching, Kubernetes deployment, API gateway authentication, CI/CD pipelines.
4. **Medicine & Healthcare Sciences:** Emergency triage, acute respiratory intubation, targeted antibiotics, pathology.
5. **Politics & Constitutional Governance:** Katiba 2010 public participation, bicameral parliament, gubernatorial impeachment, fiscal policy.

## Usage

```python

from datasets import load_dataset



dataset = load_dataset("text", data_files={"train": "kenyan_code_switch_corpus_1m.txt"})

```

## Citation

```bibtex

@dataset{kenyan_code_switch_1m_2026,

  title={Kenyan Code-Switching 1M Pretraining Corpus},

  author={Maxwell Ng'ang'a},

  year={2026},

  publisher={Hugging Face},

  url={https://huggingface.co/datasets/Maxyelow/kenyan-code-switch-1m}

}

```