Urdu_English / README.md
Abdullah17's picture
Update README.md
130d700 verified
|
Raw History Blame Contribute Delete
2.49 kB
metadata
language:
  - en
  - ur
multilinguality: translation
size_categories:
  - 10K<n<100K
task_categories:
  - translation
pretty_name: English-Urdu Parallel Corpus
tags:
  - urdu
  - english
  - parallel-corpus
  - machine-translation
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
      - split: validation
        path: data/validation-*
      - split: test
        path: data/test-*
dataset_info:
  features:
    - name: id
      dtype: string
    - name: translation
      dtype:
        translation:
          languages:
            - en
            - ur
  splits:
    - name: train
      num_examples: 88926
    - name: validation
      num_examples: 1000
    - name: test
      num_examples: 1000

English–Urdu Parallel Corpus

A sentence-aligned parallel corpus of about 91K English–Urdu pairs, intended for training and evaluating machine translation models in either direction (en→ur or ur→en).

Dataset Structure

Each example has an id and a translation dictionary with the two languages:

{
  "id": "test-0",
  "translation": {
    "en": "There is no counting children newly orphaned by the quake, but aid groups estimate the number in tens of thousands.",
    "ur": "زلزلے سے نو یتیم ہونے والے کوئی گنتی کرنے والے بچے نہیں ہیں ، لیکن امدادی گروپوں نے اس تعداد کا اندازہ دسیوں ہزاروں میں لگایا ہے۔"
  }
}
Split Pairs
train 88,926
validation 1,000
test 1,000

Usage

from datasets import load_dataset

ds = load_dataset("YOUR_USERNAME/english-urdu-parallel")
print(ds["train"][0]["translation"]["en"])
print(ds["train"][0]["translation"]["ur"])

Content

The text covers a mix of domains, including news, European Parliament proceedings, general conversational sentences, and Urdu proverbs and idioms paired with their English meanings. Sentences average roughly 13 words in English and 16 words in Urdu.

Preprocessing

The corpus was built from two line-aligned text files (100,000 lines each). The following cleaning was applied: whitespace was normalized; broken character encodings in the English text (e.g. ’) were repaired; pairs whose Urdu side contained no Urdu script (57) or whose English side contained Urdu script (35) were removed; and exact duplicate pairs (8,982) were removed.

Citation

If you use this dataset, please cite this repository.