---
language:
- ha
- ig
- ki
- yo
- rw
- luo
- pcm
- en
license: cc-by-4.0
task_categories:
- text-classification
- natural-language-inference
pretty_name: XNLI Extension for African Languages
size_categories:
- 10K<n<100K
tags:
- natural-language-inference
- cross-lingual
- African-languages
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
dataset_info:
  features:
  - name: promptID
    dtype: string
  - name: sentence1
    dtype: string
  - name: sentence2
    dtype: string
  - name: sentence1_mt
    dtype: string
  - name: sentence2_mt
    dtype: string
  - name: sentence1_validated
    dtype: string
  - name: sentence2_validated
    dtype: string
  - name: language_code
    dtype: string
  - name: language_name
    dtype: string
  - name: gold_label
    dtype: string
  - name: split_type
    dtype: string
  - name: s1_en_len
    dtype: int64
  - name: s2_en_len
    dtype: int64
  - name: s1_validated_len
    dtype: float64
  - name: s2_validated_len
    dtype: float64
  splits:
  - name: train
    num_bytes: 17980309
    num_examples: 31530
  download_size: 5198926
  dataset_size: 17980309
---

# XNLI Extension: African Languages

## Dataset Description

This dataset contains cross-lingual sentence pair data for Natural Language Inference (NLI) model training. It extends the XNLI corpus with English paired with the following African languages:

- **Hausa** (ha)
- **Igbo** (ig)
- **Kikuyu** (ki)
- **Yoruba** (yo)
- **Kinyarwanda** (rw)
- **Luo** (luo)
- **Nigerian Pidgin** (pcm)

### Dataset Statistics

- **Total Examples**: 24,539
- **Languages**: 7 African languages + English
- **Task**: Cross-lingual Sentence Pairs / Natural Language Inference
- **Format**: Parallel sentence pairs (English + African language)

### Language Distribution

- **Hausa** (ha): 5,150 sentence pairs
- **Igbo** (ig): 5,025 sentence pairs
- **Luo** (luo): 4,275 sentence pairs
- **Kinyarwanda** (rw): 3,496 sentence pairs
- **Nigerian Pidgin** (pcm): 2,703 sentence pairs
- **Kikuyu** (ki): 2,528 sentence pairs
- **Yoruba** (yo): 1,362 sentence pairs


## Dataset Structure

### Data Fields

- `english`: English sentence
- `{language}`: Sentence in the target African language (e.g., `hausa`, `igbo`, `kikuyu`, etc.)
- `language_code`: ISO 639 language code (e.g., 'ha', 'ig', 'ki')
- `language_name`: Full language name (e.g., 'Hausa', 'Igbo', 'Kikuyu')
- `created_at`: Dataset creation date

### Data Splits

This dataset is provided as a single split containing parallel sentence pairs for cross-lingual NLI model training.

## Usage
```python
from datasets import load_dataset

# Load the full dataset
dataset = load_dataset("tonative/xnli-extension")

# Filter by specific language
hausa_data = dataset['train'].filter(lambda x: x['language_code'] == 'ha')
print(f"Hausa examples: {len(hausa_data)}")

# Access sentence pairs
for example in hausa_data.select(range(3)):
    print(f"English: {example['english']}")
    print(f"Hausa: {example['hausa']}")
    print()
```

## Dataset Creation

This dataset was compiled from cross-lingual sentence pair data for English paired with:
- Hausa (5,150 pairs)
- Igbo (5,025 pairs)  
- Luo (4,275 pairs)
- Kinyarwanda (3,496 pairs)
- Nigerian Pidgin (2,703 pairs)
- Kikuyu (2,528 pairs)
- Yoruba (1,362 pairs)

**Total: 24,539 parallel sentence pairs**

## Citation

If you use this dataset, please cite:
```bibtex
@dataset{xnli_extension_2026,
  title={XNLI Extension: Cross-lingual Sentence Pairs for African Languages},
  author={Kondoro, Alfred Malengo and 
          Ibejih, Sharon and 
          Amol, Cynthia and 
          others},
  year={2026},
  organization={Tonative},
  publisher={Hugging Face},
  doi={10.57967/hf/7718},
  url={https://doi.org/10.57967/hf/7718}
}
```

## License

This dataset is released under the Creative Commons Attribution 4.0 International (CC BY 4.0) license.

## Acknowledgments

This dataset extends the original XNLI corpus (Conneau et al., 2018). We thank the original XNLI creators for making their data available. The extension of XNLI was created as part of the Tonative community initiative to advance African language datasets. We thank all volunteer translators and validators who contributed to this work.
