KenCorpus_text / README.md
Everlyn's picture
Add README.md
a52d2b5 verified
metadata
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

{
    '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

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

@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

License

CC-BY-4.0

Acknowledgments

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