mayurasandakalum's picture
Update README.md
79e05f7 verified
|
Raw
History Blame Contribute Delete
4.68 kB
metadata
dataset_info:
  features:
    - name: conversations
      list:
        - name: content
          dtype: string
        - name: role
          dtype: string
  splits:
    - name: train
      num_bytes: 513536088
      num_examples: 7122355
  download_size: 66753003
  dataset_size: 513536088
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
language:
  - en
  - si
tags:
  - code
  - ai
  - singlish
  - sinhala
  - llm
size_categories:
  - 1M<n<10M

Dataset Summary

The Singlish-to-Sinhala Dataset is a large-scale dataset designed to facilitate the translation and understanding of Romanized Sinhala (Singlish) text. It consists of over 7 million rows of Romanized Sinhala phrases alongside their Sinhala script equivalents. This dataset is particularly useful for tasks such as:

  • Translation from Singlish to Sinhala.
  • Building and evaluating NLP models for low-resource languages.
  • Fine-tuning conversational AI models.

This dataset is a reformatted version of the Swabhasha Romanized Sinhala Dataset. The original dataset comprises over 7 million entries, each containing a Romanized Sinhala phrase and its corresponding Sinhala script equivalent, formatted as "Singlish/Sinhala." In the Singlish-to-Sinhala Dataset, each entry has been transformed into a conversational format to better support tasks such as training conversational AI models.

Key Features

  • Dataset Name: Singlish-to-Sinhala Dataset
  • Rows: 7,122,355
  • Columns: conversations
  • License: None

Dataset Structure

Data Instances

Each instance in the dataset contains:

  • conversations: A list of dictionaries with content and role keys.

Example:

{
  "conversations": [
    {"content": "yoghurt", "role": "user"},
    {"content": "යෝගට්", "role": "assistant"}
  ]
}

Dataset Statistics

  • Total Rows: 7,122,355
  • Features: One column (conversations)
  • Languages: Romanized Sinhala (Singlish) and Sinhala Script

Usage

Loading the Dataset

The dataset can be easily loaded using the Hugging Face datasets library:

from datasets import load_dataset

dataset = load_dataset("mayurasandakalum/singlish-to-sinhala-dataset", split="train")
print(dataset)

Dataset Exploration

The dataset includes samples in a conversational format. Here's how you can explore the first few rows:

for i in range(5):
    print(dataset[i]["conversations"])

Output:

[
  {"content": "yoghurt", "role": "user"},
  {"content": "යෝගට්", "role": "assistant"}
]

DataLoader Example

For large-scale processing, the dataset can be wrapped in a PyTorch DataLoader:

from torch.utils.data import Dataset, DataLoader

class TextDataset(Dataset):
    def __init__(self, conversations):
        self.conversations = conversations

    def __len__(self):
        return len(self.conversations)

    def __getitem__(self, idx):
        return self.conversations[idx]

text_dataset = TextDataset(dataset["conversations"])
dataloader = DataLoader(text_dataset, batch_size=1024, num_workers=4)

Model Training

The dataset is suitable for training conversational AI models. Here’s an example preprocessing pipeline for model input:

def format_conversations(example):
    return {
        "input_text": example["conversations"][0]["content"],
        "target_text": example["conversations"][1]["content"]
    }

formatted_dataset = dataset.map(format_conversations)

Dataset Creation

Source

The dataset was derived from the Swabhasha Romanized Sinhala Dataset and reformatted to align in a conversational format. The original dataset comprises over 7 million entries, formatted as "Singlish/Sinhala," and this structured format enhances the dataset's applicability for machine translation, transliteration, and conversational AI tasks.

Processing Steps

  1. Loaded the raw dataset.
  2. Converted each "Singlish/Sinhala" pair into a structured conversation format.
  3. Batch processed using PyTorch DataLoader for scalability.
  4. Uploaded to Hugging Face using the push_to_hub API.

Citation

If you use this dataset, please cite it as follows:

@dataset{mayurasandakalum2025singlish,
  author = "Mayura Sandakalum",
  title = "Singlish-to-Sinhala Dataset",
  year = 2025,
  publisher = "Hugging Face",
  howpublished = "https://huggingface.co/datasets/mayurasandakalum/singlish-to-sinhala-dataset"
}

License

This dataset does not have a specific license associated with it.