Datasets:
🇳🇵 MoHA Nepal — Nepali Government Corpus
Dataset Summary
A cleaned Nepali-language text corpus extracted from official PDF documents published by the Ministry of Home Affairs (MoHA), Nepal (moha.gov.np). The corpus covers annual progress reports and quarterly disclosures spanning fiscal years 2076/77 – 2082/83 (approx. 2019–2026).
Each row is a self-contained chunk of Nepali text (~300–1200 characters), cleaned of OCR artifacts and annotated with rich metadata including source URL, content type, and quality metrics.
Dataset Structure
Splits
| Split | Rows |
|---|---|
| train | ~1,820 |
| validation | ~230 |
| test | ~230 |
| total | ~2,280 |
Fields
| Field | Type | Description |
|---|---|---|
text |
string | Cleaned Nepali text chunk (300–1200 chars) |
id |
string | Unique chunk ID — format: moha-{pdf_id}-{chunk_id} |
chunk_global_id |
int | Global chunk index across all PDFs |
chunk_local_id |
int | Chunk index within its source PDF |
source_pdf_id |
int | Source PDF number (1–14) |
source_url |
string | Direct URL to the original PDF on moha.gov.np |
source_filename |
string | PDF filename |
source_total_tokens |
int | Total token count of the original PDF (all languages) |
source_nepali_tokens |
int | Nepali-only token count of the original PDF |
char_count |
int | Character count of this chunk |
nepali_char_ratio |
float | Fraction of Devanagari characters in chunk (0.0–1.0) |
content_type |
string | Semantic content category (see below) |
language |
string | ISO 639-1: ne (Nepali) |
script |
string | ISO 15924: Deva (Devanagari) |
domain |
string | government |
country |
string | NP (Nepal) |
organization |
string | Ministry of Home Affairs, Nepal (MoHA) |
document_type |
string | annual_progress_report |
license |
string | public_domain_gov_np |
dataset_version |
string | 1.0 |
created_date |
string | Date this dataset was generated (YYYY-MM-DD) |
Content Types
| Value | Description |
|---|---|
report_narrative |
Main body text of annual reports |
policy_text |
Legal, policy, or regulatory passages |
table_data |
Numeric or tabular content |
table_of_contents |
TOC sections with page references |
abbreviations |
Abbreviation or glossary lists |
appendix |
Annexure / appendix sections |
other |
Miscellaneous short passages |
Data Collection & Processing
Source
All documents were downloaded from moha.gov.np — the official website of the Ministry of Home Affairs, Government of Nepal. Documents are publicly available government publications.
PDF Extraction
Text was extracted from PDF files using automated extraction tools. Because the PDFs are primarily scanned government documents, the raw extracted text contained significant OCR noise.
Cleaning Pipeline
The following cleaning steps were applied to every line of text before chunking:
| Step | What was removed / fixed |
|---|---|
[Page N] markers |
Extractor-inserted page labels |
(cid:N) sequences |
Corrupt PDF glyph encoding artifacts |
| TOC dot leaders | Runs of 4+ dots collapsed to … |
Unicode replacement char U+FFFD |
Bad bytes from encoding errors |
Private-use area chars U+E000–U+F8FF |
PDF internal glyph references |
Box-drawing chars ─ |
Separator line artifacts |
Cedilla ¸ |
OCR noise character |
| OCR space injection — Rule 1 | Space inserted before a vowel sign (matra); matras cannot start a Nepali word, so the space is always spurious. Example: सशु ासि → सशुासि |
| OCR space injection — Rule 2 | Matra followed by space then a 1–2 character Devanagari fragment — indicates a mid-word split by OCR. Example: कायहि रू → कायहिरू |
| Double spaces | Collapsed to single space |
| NFC normalization | Unicode canonical composition applied |
Chunking Strategy
- Lines are first grouped into paragraphs (split on blank / very short lines)
- Paragraphs are merged until the chunk reaches 300–1200 characters
- Chunks below the minimum are appended to the previous chunk
- Any chunk where less than 35% of characters are Devanagari is discarded (filters out garbled / non-Nepali content)
Garbled PDF Handling
PDFs #2 and #4 in the source collection had severely corrupted Devanagari encoding ((cid:N) sequences making up >5% of characters). These were automatically detected and skipped — no text from those PDFs appears in the dataset.
Example Row
{
"text": "गृह मन्त्रालयले आर्थिक वर्ष २०७९/८० मा सार्वजनिक सुरक्षा, सीमा व्यवस्थापन र आन्तरिक सुशासन सम्बन्धी विभिन्न कार्यक्रमहरू सञ्चालन गरेको छ।",
"id": "moha-001-0042",
"chunk_global_id": 42,
"chunk_local_id": 42,
"source_pdf_id": 1,
"source_url": "https://www.moha.gov.np/upload/.../annual_report_2079_80.pdf",
"source_filename": "annual_report_2079_80.pdf",
"source_total_tokens": 412000,
"source_nepali_tokens": 5200,
"char_count": 148,
"nepali_char_ratio": 0.8716,
"content_type": "report_narrative",
"language": "ne",
"script": "Deva",
"domain": "government",
"country": "NP",
"organization": "Ministry of Home Affairs, Nepal (MoHA)",
"document_type": "annual_progress_report",
"license": "public_domain_gov_np",
"dataset_version": "1.0",
"created_date": "2025-04-26"
}
Intended Uses
- Language model pre-training — Nepali domain-specific corpus
- Fine-tuning — government/legal Nepali NLP tasks
- Benchmarking — Nepali text generation and understanding
- Linguistic research — Devanagari script, Nepali morphology
- Low-resource NLP — Nepali is an under-resourced language; this corpus adds government-domain coverage
Limitations
- OCR quality varies across PDFs — some text may still contain reconstruction errors that could not be fixed without a Nepali spell-checker
- The corpus covers only MoHA documents; it does not represent all domains of Nepali language
- Table content (
table_data) may have incomplete rows due to PDF column extraction limitations - Some conjunct characters (e.g.,
कायक्रमvs the OCR formकायक्रि म) may not be fully restored where the base consonants themselves were misread by OCR
License
All source documents are official publications of the Government of Nepal (Ministry of Home Affairs) and are in the public domain under Nepal's government open publication policy. This dataset is released for research and educational use.
Citation
If you use this dataset, please cite it as:
@dataset{moha_nepal_nepali_2025,
title = {MoHA Nepal -- Nepali Government Corpus},
author = {Ministry of Home Affairs, Nepal (source) and dataset contributors},
year = {2025},
url = {https://huggingface.co/datasets/YOUR_USERNAME/moha-nepal-nepali},
note = {Extracted and cleaned from moha.gov.np official PDF publications}
}
Contact
For questions about this dataset, open a discussion on the dataset page. For questions about the source documents, visit moha.gov.np.
- Downloads last month
- 21