π Makhzan Urdu Corpus
The Makhzan Urdu Corpus is a high-quality, expert-curated collection of classical and modern Urdu texts. This dataset has been extracted and cleaned from the Makhzan GitHub repository and structured into the Hugging Face datasets library format.
π Dataset Summary
The corpus contains over 6.26 million words of Urdu text from various literary and scholarly publications. Each document is tokenized into paragraphs and tagged with semantic structure when available (e.g., headings, body, lists). This dataset is valuable for Urdu NLP tasks like:
- Language modeling
- Text classification
- Named entity recognition
- Machine translation
π Supported Tasks and Leaderboards
language-modeling: Build or fine-tune language models like BERT or GPT for Urdu.text-classification-other: Analyze sentiment, topic, or discourse in Urdu paragraphs.
π Dataset Structure
Each example in the dataset is a dictionary with the following fields:
{
"text": "Ψ§Ψ±Ψ―Ω Ϊ©Ψ§ Ψ§ΫΪ© ΩΎΫΨ±Ψ§Ϊ―Ψ±Ψ§Ω ΫΫΨ§ΪΊ Ψ΄Ψ§Ω
Ω ΫΫΫ"
}
All entries are paragraphs extracted from structured XML files.
π’ Dataset Statistics
| Feature | Value |
|---|---|
| Total paragraphs | ~300,000 |
| Total tokens | ~6.26 million |
| Format | Paragraph-level text |
| Language | Urdu (ur) |
π₯ How to Use
from datasets import load_dataset
dataset = load_dataset("m-aliabbas1/makhzan-urdu-corpus")
print(dataset["train"][0])
π οΈ Dataset Creation
The original XML files were parsed using xml.etree.ElementTree. Paragraphs were extracted, cleaned, and de-duplicated. Any English text, footnotes, and formatting tags were removed during preprocessing.
π License
The dataset is distributed under a custom license. Usage is permitted for research and non-commercial applications. Redistribution of raw XML text may be restricted based on original source copyrights.
Refer to the original license for details.
βοΈ Citation
If you use this dataset, please cite:
@misc{makhzan2020corpus,
author = {Ahmed, Zeerak},
title = {Makhzan: An Urdu Corpus for Computational Linguistics},
year = {2020},
url = {https://github.com/zeerakahmed/makhzan}
}
π€ Contributions
- Original data collection and annotation: Zeerak Ahmed
- Dataset formatting and Hugging Face integration: Muhammad Ali Abbas
- Downloads last month
- 10