File size: 3,909 Bytes
a52d2b5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
---

language:
  - sw
  - luo
  - bxk
  - lri
  - rag
license: cc-by-4.0
task_categories:
  - text-generation
  - text-classification
tags:
  - swahili
  - kiswahili
  - dholuo
  - lubukusu
  - lumarachi
  - lulogooli
  - kenyan-languages
  - low-resource-languages
  - african-languages
  - text-corpus
pretty_name: KenCorpus Text
size_categories:
  - 1K<n<10K
---


# KenCorpus Text: A Kenyan Multilingual Text Corpus

## Dataset Description

**KenCorpus Text** is a multilingual text corpus for Kenyan languages, collected from language communities including indigenous stories, student compositions, native language media stations, and publishers. The corpus goes beyond conventional religious texts to represent everyday language use.

Three languages were selected: **Kiswahili**, **Luhya** (dialects: Lumarachi, Logooli, Lubukusu), and **Dholuo**.

## Dataset Statistics

| Language | Files | Source |
|----------|-------|--------|
| Swahili | 2,585 | Community texts |
| Swahili (Tweets) | 324 | Social media |
| Dholuo | 166 | Community texts |
| Lumarachi | 449 | Community texts |
| Lubukusu | 16 | Community texts |
| Logooli | 247 | Community texts |

## Data Fields

| Column | Type | Description |
|--------|------|-------------|
| text | string | Full text content |
| language | string | Language (Swahili, Dholuo, Lubukusu, Lumarachi, Logooli, Luhya_Bukusu, etc.) |

| genre | string | Genre (Culture, News, Creative_writing, Exam, Agriculture, etc.) |
| source | string | Data source (Community, Educational_Institution, Media, Publisher, etc.) |

| title | string | Title of the text if available |

| story_id | string | Unique identifier matching the KenCorpus metadata |
| source_type | string | Source category (community_text, tweets) |

### Example Record

```python

{

    'text': 'HISTORIA YA SHULE YA UPILI YA OLEFREMA...',

    'language': 'Swahili',

    'genre': 'Creative_writing',

    'source': 'Educational_Institution',

    'title': 'Historia ya shule',

    'story_id': '3510',

    'source_type': 'community_text'

}

```

---

## Usage

```python

from datasets import load_dataset



# Load the dataset

dataset = load_dataset("Kencorpus/KenCorpus_text")



# Access samples

print(dataset['train'][0])



# Filter by language

swahili = dataset['train'].filter(lambda x: x['language'] == 'Swahili')

dholuo = dataset['train'].filter(lambda x: x['language'] == 'Dholuo')



print(f"Swahili: {len(swahili)}, Dholuo: {len(dholuo)}")

```

---

## Genres

Culture, News, Creative_writing, Exam, Agriculture, Commerce, Religion, Song, Health, Story, and more.



---



## Data Collection



Primary data was collected from respective language communities, including indigenous stories and narratives from student compositions, native language media stations, and publishers.



## Dataset Curators



**Kiswahili:** Rose Felynix, Khalid Kitito, Dr. Benard Okal

**Dholuo:** Jotham Ondu Ajiki, Dr. Jackline Okello, Jonathan Muga, Mercy Lavinca Oduoll

**Luhya (Logooli):** Salano Odari, Dr. Phillip Lumwamu

**Luhya (Bukusu):** Mactilda Nekesa Makana, Mulwale Martin

**Luhya (Marachi):** Yonah Weunda



---



## Citation



```bibtex

@article{wanjawa2022kencorpus,

  title={Kencorpus: A Kenyan Language Corpus of Swahili, Dholuo and Luhya for Natural Language Processing Tasks},

  author={Wanjawa, Barack W. and Wanzare, Lilian D. and Indede, Florence and McOnyango, Owen and Ombui, Edward and Muchemi, Lawrence},

  journal={arXiv preprint arXiv:2208.12081},

  year={2022}

}

```



---



## Links



- **Research Paper**: https://arxiv.org/abs/2208.12081

- **Dataverse**: https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/KLCKL5



## License



**CC-BY-4.0**



## Acknowledgments



Part of the **Kencorpus** project for low-resource Kenyan language NLP resources.