Dataset Viewer
The dataset viewer is taking too long to fetch the data. Try to refresh this page.
Server-side error
Error code:   ClientConnectionError

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.

Downloads last month
51