You need to agree to share your Hugging Face information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

English-Swahili Agricultural Parallel Corpus (MT-Eng-Swa)

Dataset Summary

MT-Eng-Swa is a parallel corpus of 52,170 English-Swahili sentence pairs in the agricultural domain. It is published by AI4Agric to support machine translation and agricultural advisory services for Swahili-speaking farmers in Kenya and the wider East African region. The English side consists of farmer questions and extension content covering crops, livestock, soil fertility, pest management, post-harvest handling and agribusiness. Each English sentence has a human translation into Swahili that has been reviewed and approved.

The corpus is one of three parallel datasets released together. The other two are MT-Eng-Kik (Kikuyu) and MT-Eng-Kln (Kalenjin). Around 46,500 serial numbers are shared across all three datasets. This allows multi-way alignment through English, as well as Swahili-Kikuyu and Swahili-Kalenjin pairs to be built through the shared identifiers.

Languages

Role Language ISO 639 code
Source English en
Target Swahili (Kiswahili) sw / swa

The Swahili text follows the variety used in Kenya. Swahili is a Bantu language and a national and official language of Kenya.

Dataset Structure

Data Fields

Field Type Description
source_text string English sentence
target_text string Swahili translation
language string Target language (always swahili)
serial_number string Unique identifier for the sentence pair. Prefixes are Hq or KARLO
import_source string Origin of the English sentence (Huggingface, KARLO or Farmerchat)

Data Instance

{
  "source_text": "Advantage of feeding packchong my cow",
  "target_text": "Faida ya kulisha ng'ombe wangu nyasi aina ya Packchong",
  "language": "swahili",
  "serial_number": "Hq007",
  "import_source": "Huggingface"
}

Data Splits

The dataset is released as a single train split of 52,170 pairs. No official validation or test split is defined. Users who report results should state how they split the data and should fix a random seed.

Dataset Statistics

Source Composition

import_source Pairs Share
Huggingface 46,285 88.7%
KARLO 3,555 6.8%
Farmerchat 2,330 4.5%
Total 52,170 100%

Sentence Length (words)

Mean Median Min Max Total tokens Vocabulary (lower-cased)
English 11.0 11 4 108 571,431 17,450
Swahili 12.5 12 1 158 654,100 22,709

Swahili translations are on average slightly longer than their English sources. The Swahili vocabulary is larger than the English one, which reflects the noun class prefixes and verbal affixes of Swahili morphology.

Usage

from datasets import load_dataset

ds = load_dataset("AI4Agric/MT-Eng-Swa", split="train")
print(ds[0])

# Create a reproducible 80/10/10 split
tmp = ds.train_test_split(test_size=0.2, seed=42)
vt = tmp["test"].train_test_split(test_size=0.5, seed=42)
train, validation, test = tmp["train"], vt["train"], vt["test"]

Dataset Creation

Source Data

The English sentences come from three sources:

  • Huggingface (Hq serial numbers): farmer questions from an existing agricultural question dataset on Hugging Face. TODO: name and link the dataset.
  • KARLO (KARLO serial numbers): sentences from agricultural extension and research material. TODO: give the full name of the source organisation.
  • Farmerchat (Hq serial numbers): farmer queries from the FarmerChat advisory service. TODO: confirm and link.

Many of the Huggingface and Farmerchat sentences are real farmer questions. They keep informal spelling and phrasing (for example, "Advantage of feeding packchong my cow"). These have been left as they are because they reflect how farmers actually write. The Swahili translations are written in standard Swahili. Product and variety names such as Packchong and T5Z are kept in their original form.

Translation and Review

Native Swahili speakers translated the English sentences. Each translation was then reviewed and approved before it was included. TODO: describe the number of translators, how they were recruited, the review protocol and the platform used.

Cleaning Applied Before Release

Leading, trailing and repeated whitespace was removed. Pairs with an empty source or target were dropped (one pair). Exact duplicate pairs were removed, which left 52,170 pairs out of 52,171.

Considerations and Limitations

  • Domain. The corpus is specific to agriculture. Models trained only on it will not generalise well to other domains.
  • Repeated source sentences. Three English sentences occur more than once with different Swahili translations. These should be kept in the same split to avoid leakage.
  • Very short targets. Some Swahili translations are a single word. Users may want to filter pairs with extreme length ratios.
  • Noisy source text. Farmer questions contain spelling and grammar errors on the English side.
  • Mixed apostrophes. Words such as ng'ombe appear with both straight (') and curly (’) apostrophes. Normalising them before training is recommended.

Related Datasets

Citation

@misc{ai4agric_mt_eng_swa_2026,
  author       = {AI4Agric},
  title        = {{MT-Eng-Swa}: English-Swahili Agricultural Parallel Corpus},
  year         = {2026},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/datasets/AI4Agric/MT-Eng-Swa}}
}
Downloads last month
36