Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed
Error code:   DatasetGenerationError
Exception:    IndexError
Message:      list index out of range
Traceback:    Traceback (most recent call last):
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1848, in _prepare_split_single
                  original_shard_lengths[original_shard_id] += len(table)
                  ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
              IndexError: list index out of range
              
              The above exception was the direct cause of the following exception:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
                  parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~^
                      builder, max_dataset_size_bytes=max_dataset_size_bytes
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  )
                  ^
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
                  builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
                  ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1683, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~^
                      gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                  ):
                  ^
                File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1869, in _prepare_split_single
                  raise DatasetGenerationError("An error occurred while generating the dataset") from e
              datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

dataset_name
string
source_lang
string
target_lang
string
domain
string
license
string
version
string
source_column
string
target_column
string
Kamba-Swahili
kam
swa
general
CC-BY-4.0
1.0
kam
swa
Kikuyu-Kalenjin
kik
kln
general
CC-BY-4.0
1.0
kik
kln
Luo-English-Corpus
luo
eng
general
null
null
null
null
Swahili-English-Corpus
swa
eng
general
null
null
null
null
Swahili-Sheng-Corpus
swa
shg
general
null
null
null
null

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

πŸ‡°πŸ‡ͺ LughaGen Modular Engine

LughaGen is a high-performance, modular data preprocessing and normalization engine designed to build high-quality parallel corpora for low-resource Kenyan and regional languages.

The pipeline dynamically loads, normalizes, cleans, and partitions raw parallel datasets (CSV, Excel, Parquet, JSONL) into stratified train, validation, and test splits ready for Machine Learning, Neural Machine Translation (NMT), and LLM tokenizer training.


πŸš€ Key Features

  • Dynamic Translation Unpacking: Automatically detects and unpacks complex nested structures (like Hugging Face translation dictionary layouts).
  • Self-Healing Schema Parsing: If a dataset lacks a metadata.json file or has corrupted headers, the engine dynamically falls back to parsing folder-name patterns (e.g., english-kamba βž” eng to kam) using a pre-configured language alias matrix.
  • De-duplication & Sanitization: Cleans formatting anomalies, stripping invisible artifacts (such as Windows Byte Order Marks and trailing web spaces).
  • Stratified Splitting: Handles balanced train/val/test dataset partitioning while maintaining strict index mapping integrity.

πŸ“Š Consolidated Corpus Statistics

The pipeline successfully unified 6,190,120 parallel sentences across several key regional language pairs:

Language Pair Total Records Unique Domains Avg Source Length (Chars) Description
eng-kik 2,200,684 1 ~47.9 English ↔ Kikuyu (GΔ©kΕ©yΕ©)
eng-kam 1,679,956 1 ~43.9 English ↔ Kamba (KΔ©kamba)
luo-eng 1,470,655 1 ~52.0 Dholuo ↔ English
kam-swa 223,350 1 ~49.4 KΔ©kamba ↔ Swahili (Kiswahili)
kik-swa 219,495 1 ~49.2 Kikuyu ↔ Swahili
swa-eng 203,321 1 ~48.9 Swahili ↔ English
swa-kal 131,960 1 ~50.5 Swahili ↔ Kalenjin
eng-luo 40,422 1 ~130.7 English ↔ Dholuo
kam-kik 18,710 1 ~47.1 KΔ©kamba ↔ Kikuyu
swa-shg 1,567 1 ~50.6 Swahili ↔ Sheng

πŸ“‚ Repository Structure

β”œβ”€β”€ datasets/
β”‚   β”œβ”€β”€ raw/                      # Raw language asset directories (Ignored by Git)
β”‚   β”‚   β”œβ”€β”€ english-kamba/
β”‚   β”‚   β”œβ”€β”€ english-kikuyu/
β”‚   β”‚   └── ...
β”‚   └── processed/                # Normalized & partitioned outputs
β”‚       β”œβ”€β”€ dataset_statistics.csv # Summary of current build (Tracked)
β”‚       β”œβ”€β”€ train.csv             # (Ignored by Git)
β”‚       β”œβ”€β”€ validation.csv        # (Ignored by Git)
β”‚       └── test.csv              # (Ignored by Git)
β”œβ”€β”€ scripts/                      # Core processing architecture
β”‚   β”œβ”€β”€ merge_datasets.py         # Main execution runner
β”‚   β”œβ”€β”€ normalizer.py             # Smart schema mapper & format decoder
β”‚   β”œβ”€β”€ cleaner.py                # Text deduplication and cleaning rules
β”‚   β”œβ”€β”€ splitter.py               # Train/Val/Test partitioning logic
β”‚   β”œβ”€β”€ dataset_loader.py         # Multi-format I/O loader
β”‚   β”œβ”€β”€ pipeline_config.py        # System-wide path configurations
β”‚   └── statistics.py             # Analytics generation tool
β”œβ”€β”€ .gitignore
β”œβ”€β”€ requirements.txt
└── README.md
Downloads last month
54