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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- luo
|
| 4 |
+
- bxk
|
| 5 |
+
- lri
|
| 6 |
+
- rag
|
| 7 |
+
license: cc-by-4.0
|
| 8 |
+
task_categories:
|
| 9 |
+
- token-classification
|
| 10 |
+
- part-of-speech
|
| 11 |
+
tags:
|
| 12 |
+
- kenyan-languages
|
| 13 |
+
- dholuo
|
| 14 |
+
- lubukusu
|
| 15 |
+
- lumarachi
|
| 16 |
+
- lulogooli
|
| 17 |
+
- pos-tagging
|
| 18 |
+
- low-resource-languages
|
| 19 |
+
- african-languages
|
| 20 |
+
pretty_name: KenPOS
|
| 21 |
+
size_categories:
|
| 22 |
+
- 100K<n<1M
|
| 23 |
+
configs:
|
| 24 |
+
- config_name: dho
|
| 25 |
+
data_files: "dho/*.parquet"
|
| 26 |
+
- config_name: lbk
|
| 27 |
+
data_files: "lbk/*.parquet"
|
| 28 |
+
- config_name: lch
|
| 29 |
+
data_files: "lch/*.parquet"
|
| 30 |
+
- config_name: llg
|
| 31 |
+
data_files: "llg/*.parquet"
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
# KenPOS: Kenyan Languages Part-of-Speech Tagged Dataset
|
| 35 |
+
|
| 36 |
+
## Dataset Description
|
| 37 |
+
|
| 38 |
+
**KenPOS** is a part-of-speech (POS) tagged corpus for Kenyan languages, featuring **156,994 tokens** across four languages. The dataset provides manually annotated POS tags for low-resource Kenyan languages, enabling NLP research and applications.
|
| 39 |
+
|
| 40 |
+
## Dataset Statistics
|
| 41 |
+
|
| 42 |
+
| Language | Code | Tokens | Sentences | Files | Unique POS Tags |
|
| 43 |
+
|----------|------|--------|-----------|-------|-----------------|
|
| 44 |
+
| Dholuo | dho | 54,712 | 70 | 168 | 114 |
|
| 45 |
+
| Lubukusu | lbk | 51,900 | 154 | 62 | 97 |
|
| 46 |
+
| Lumarachi| lch | 25,917 | 27 | 212 | 78 |
|
| 47 |
+
| Lulogooli| llg | 24,465 | 290 | 121 | 75 |
|
| 48 |
+
| **Total**| |**156,994**|**541**|**563**| |
|
| 49 |
+
|
| 50 |
+
## Languages & Codes
|
| 51 |
+
|
| 52 |
+
| Language / Dialect | Code | Family / Notes |
|
| 53 |
+
|---------------------|------|-------------------------|
|
| 54 |
+
| Dholuo (Luo) | dho | Nilotic (western Kenya) |
|
| 55 |
+
| Lubukusu (Bukusu) | lbk | Bantu, Luhya dialect |
|
| 56 |
+
| Lumarachi (Marachi) | lch | Bantu, Luhya dialect |
|
| 57 |
+
| Lulogooli (Logooli) | llg | Bantu, Luhya dialect |
|
| 58 |
+
|
| 59 |
+
## Dataset Format
|
| 60 |
+
|
| 61 |
+
The dataset is distributed as **Parquet files** for optimal performance and compatibility:
|
| 62 |
+
|
| 63 |
+
- **Format**: Apache Parquet (columnar storage)
|
| 64 |
+
- **Encoding**: UTF-8
|
| 65 |
+
- **File naming**: `{language}/train.parquet`
|
| 66 |
+
- **Compatibility**: Works with `datasets` 4.0.0+ without custom loading scripts
|
| 67 |
+
|
| 68 |
+
---
|
| 69 |
+
|
| 70 |
+
## Data Fields
|
| 71 |
+
|
| 72 |
+
Each record in the dataset contains:
|
| 73 |
+
|
| 74 |
+
- **token**: `string` - The word or token
|
| 75 |
+
- **pos_tag**: `string` - Part-of-speech tag (e.g., NN, V, ADJ, PUNCT)
|
| 76 |
+
- **sentence_id**: `int` - Unique identifier for the sentence
|
| 77 |
+
- **position**: `int` - Position of the token within the sentence (0-indexed)
|
| 78 |
+
- **filename**: `string` - Source filename from which the token was extracted
|
| 79 |
+
|
| 80 |
+
### Example Record
|
| 81 |
+
|
| 82 |
+
```python
|
| 83 |
+
{
|
| 84 |
+
'token': 'Kezia',
|
| 85 |
+
'pos_tag': 'NN',
|
| 86 |
+
'sentence_id': 0,
|
| 87 |
+
'position': 0,
|
| 88 |
+
'filename': '4411_dho_pos.csv'
|
| 89 |
+
}
|
| 90 |
+
```
|
| 91 |
+
|
| 92 |
+
---
|
| 93 |
+
|
| 94 |
+
## Usage
|
| 95 |
+
|
| 96 |
+
### Loading with 🤗 Datasets
|
| 97 |
+
|
| 98 |
+
**Compatible with datasets 4.0.0+** (No `trust_remote_code` needed!)
|
| 99 |
+
|
| 100 |
+
```python
|
| 101 |
+
from datasets import load_dataset
|
| 102 |
+
|
| 103 |
+
# Load Dholuo POS dataset
|
| 104 |
+
dho = load_dataset("Kencorpus/KenPOS", "dho")
|
| 105 |
+
|
| 106 |
+
# Load Lubukusu POS dataset
|
| 107 |
+
lbk = load_dataset("Kencorpus/KenPOS", "lbk")
|
| 108 |
+
|
| 109 |
+
# Load Lumarachi POS dataset
|
| 110 |
+
lch = load_dataset("Kencorpus/KenPOS", "lch")
|
| 111 |
+
|
| 112 |
+
# Load Lulogooli POS dataset
|
| 113 |
+
llg = load_dataset("Kencorpus/KenPOS", "llg")
|
| 114 |
+
|
| 115 |
+
# Access the data
|
| 116 |
+
print(dho['train'][0])
|
| 117 |
+
# Output: {'token': 'Kezia', 'pos_tag': 'NN', 'sentence_id': 0, 'position': 0, 'filename': '4411_dho_pos.csv'}
|
| 118 |
+
```
|
| 119 |
+
|
| 120 |
+
### Reconstructing Sentences
|
| 121 |
+
|
| 122 |
+
```python
|
| 123 |
+
from datasets import load_dataset
|
| 124 |
+
import pandas as pd
|
| 125 |
+
|
| 126 |
+
# Load dataset
|
| 127 |
+
dho = load_dataset("Kencorpus/KenPOS", "dho")
|
| 128 |
+
df = pd.DataFrame(dho['train'])
|
| 129 |
+
|
| 130 |
+
# Get first sentence
|
| 131 |
+
sentence_0 = df[df['sentence_id'] == 0].sort_values('position')
|
| 132 |
+
print(' '.join(sentence_0['token'].tolist()))
|
| 133 |
+
```
|
| 134 |
+
|
| 135 |
+
### Analyzing POS Tags
|
| 136 |
+
|
| 137 |
+
```python
|
| 138 |
+
from datasets import load_dataset
|
| 139 |
+
import pandas as pd
|
| 140 |
+
|
| 141 |
+
# Load dataset
|
| 142 |
+
dho = load_dataset("Kencorpus/KenPOS", "dho")
|
| 143 |
+
df = pd.DataFrame(dho['train'])
|
| 144 |
+
|
| 145 |
+
# Count POS tag frequencies
|
| 146 |
+
pos_counts = df['pos_tag'].value_counts()
|
| 147 |
+
print(pos_counts.head(10))
|
| 148 |
+
```
|
| 149 |
+
|
| 150 |
+
---
|
| 151 |
+
|
| 152 |
+
## POS Tag Categories
|
| 153 |
+
|
| 154 |
+
The dataset uses a variety of POS tags including:
|
| 155 |
+
|
| 156 |
+
- **NN** - Noun
|
| 157 |
+
- **V** - Verb
|
| 158 |
+
- **ADJ/Adj.** - Adjective
|
| 159 |
+
- **ADV/Adv** - Adverb
|
| 160 |
+
- **PRON** - Pronoun
|
| 161 |
+
- **ADP** - Adposition (preposition/postposition)
|
| 162 |
+
- **DET/Det.** - Determiner
|
| 163 |
+
- **CONJ/Conj.** - Conjunction
|
| 164 |
+
- **NUM** - Numeral
|
| 165 |
+
- **PUNCT/PUNC** - Punctuation
|
| 166 |
+
- And many more fine-grained categories
|
| 167 |
+
|
| 168 |
+
**Note**: Tag naming conventions may vary slightly across files (e.g., PUNCT vs PUNC, ADJ vs Adj.).
|
| 169 |
+
|
| 170 |
+
---
|
| 171 |
+
|
| 172 |
+
## Dataset Curators
|
| 173 |
+
|
| 174 |
+
- **Florence Indede** (Maseno University)
|
| 175 |
+
- **Owen McOnyango** (Maseno University)
|
| 176 |
+
- **Lilian D.A. Wanzare** (Maseno University)
|
| 177 |
+
- **Barack Wanjawa** (University of Nairobi)
|
| 178 |
+
- **Edward Ombui** (Africa Nazarene University)
|
| 179 |
+
- **Lawrence Muchemi** (University of Nairobi)
|
| 180 |
+
|
| 181 |
+
---
|
| 182 |
+
|
| 183 |
+
## Citation
|
| 184 |
+
|
| 185 |
+
If you use this dataset in your research, please cite:
|
| 186 |
+
|
| 187 |
+
```bibtex
|
| 188 |
+
@article{wanjawa2022kencorpus,
|
| 189 |
+
title={Kencorpus: A Kenyan Language Corpus of Swahili, Dholuo and Luhya for Natural Language Processing Tasks},
|
| 190 |
+
author={Wanjawa, Barack W. and Wanzare, Lilian D. and Indede, Florence and McOnyango, Owen and Ombui, Edward and Muchemi, Lawrence},
|
| 191 |
+
journal={arXiv preprint arXiv:2208.12081},
|
| 192 |
+
year={2022}
|
| 193 |
+
}
|
| 194 |
+
```
|
| 195 |
+
|
| 196 |
+
---
|
| 197 |
+
|
| 198 |
+
## Links
|
| 199 |
+
|
| 200 |
+
- **Research Paper**: https://arxiv.org/abs/2208.12081
|
| 201 |
+
- **Dataverse**: https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/KLCKL5
|
| 202 |
+
- **ResearchGate**: https://www.researchgate.net/publication/371767223
|
| 203 |
+
- **Semantic Scholar**: https://www.semanticscholar.org/paper/8cf70c5cd8b195ed7a399ea2cdc0b0e8f08c61ce
|
| 204 |
+
|
| 205 |
+
---
|
| 206 |
+
|
| 207 |
+
## License
|
| 208 |
+
|
| 209 |
+
This dataset is licensed under **CC-BY-4.0**.
|
| 210 |
+
|
| 211 |
+
---
|
| 212 |
+
|
| 213 |
+
## Acknowledgments
|
| 214 |
+
|
| 215 |
+
This dataset is part of the **Kencorpus** project, which aims to create NLP resources for low-resource Kenyan languages.
|