marsh-mellow/hindi_wikipedia
Hindi Wikipedia Corpus Dataset Description The Hindi Wikipedia Corpus is a pure Hindi text dataset derived from the Hindi-language Wikipedia (as.wikipedia.org). It contains cleaned plain text extracted from Wikipedia articles, stripped of all formatting, with non-Hindi characters completely removed. This dataset is designed for language modeling, NLP research, creating Hindi specific tokenizers, and other Hindi-language processing tasks. Data… See the full description on the dataset page: https://huggingface.co/datasets/marsh-mellow/hindi_wikipedia.
Hindi Wikipedia Corpus
Dataset Description
The Hindi Wikipedia Corpus is a pure Hindi text dataset derived from the Hindi-language Wikipedia (as.wikipedia.org). It contains cleaned plain text extracted from Wikipedia articles, stripped of all formatting, with non-Hindi characters completely removed. This dataset is designed for language modeling, NLP research, creating Hindi specific tokenizers, and other Hindi-language processing tasks.
Data Processing
- Crawling
- Used the
mwclientPython library to interact with Wikipedia’s API. - Only collected content from the main namespace (
namespace=0). - Pages that were redirects were automatically resolved to their target articles.
- Page titles were tracked to avoid processing the same article multiple times.
- Used
mwparserfromhellto strip all MediaWiki formatting (links, templates, etc.).
- Filtering
- Applied a Unicode regex to keep only Hindi characters (
U+0980–U+097F), Hindi digits, whitespace, and essential punctuation. - Excluded pages where more than 90% of the content was punctuation or whitespace after cleaning.
- Removed very short pages that contained too little meaningful text.
Dataset Format
The dataset is provided as a .jsonl (JSON Lines) file, with each line containing:
{"text": "यह एक प्रकार का अल्कोहल है। ..."}Example Usage
from datasets import load_dataset
# Load the dataset
dataset = load_dataset("marsh-mellow/hindi_wikipedia")
# Access the first example
print(dataset["train"][0]["text"])License
The text in this dataset originates from Hindi Wikipedia, which is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA 4.0) License.
