KanoonGPT/indian-legal-documents
收藏Hugging Face2026-05-29 更新2026-05-31 收录
下载链接:
https://hf-mirror.com/datasets/KanoonGPT/indian-legal-documents
下载链接
链接失效反馈官方服务:
资源简介:
---
pretty_name: Indian Legal Documents
language:
- en
license: apache-2.0
tags:
- law
- legal
- india
- statutes
- acts
- rules
- regulations
- notifications
- legal-documents
- legal-tech
- text
- tabular
- datasets
- nlp
task_categories:
- text-generation
- question-answering
- feature-extraction
- text-retrieval
- text-ranking
- summarization
size_categories:
- 10K<n<100K
configs:
- config_name: default
data_files:
- split: train
path: data/train-*.parquet
---
# Indian Legal Documents
**Open Indian statutory and legal-document data for AI, search, and legal research.**
This dataset is part of the **KanoonGPT Open Legal Data Initiative** — an effort to make Indian legal data easier to access, structure, and build on for open-source research, legal tech, and production AI systems.
KanoonGPT is building structured Indian legal datasets and data infrastructure for open-source, research, and enterprise AI applications. Learn more at [kanoongpt.in](https://kanoongpt.in).
Repository: [KanoonGPT/indian-legal-documents](https://huggingface.co/datasets/KanoonGPT/indian-legal-documents)
Related dataset: [KanoonGPT/indian-case-laws](https://huggingface.co/datasets/KanoonGPT/indian-case-laws)
## Coverage at a glance
This dataset contains **35,851 Indian legal documents** prepared for NLP, search, retrieval, analytics, and LLM training/evaluation.
It includes Acts, Rules, Notifications, Circulars, Orders, Regulations, Guidelines, Ordinances, Schemes, Manuals, Policies, and other legal or quasi-legal government documents.
### Dataset size
| Metric | Value |
|---|---:|
| Documents | 35,851 |
| Unique document IDs | 35,851 |
| Median text length | 9,495 characters |
| Average text length | 44,106 characters |
| 75th percentile text length | 35,901 characters |
| 90th percentile text length | 96,122 characters |
| Maximum text length | 6,664,304 characters |
### Major document types
| Document type | Documents | Share |
|---|---:|---:|
| Rules | 11,069 | 30.88% |
| Notification | 9,078 | 25.32% |
| Act | 8,533 | 23.80% |
| Legislation | 1,756 | 4.90% |
| Circular | 1,396 | 3.89% |
| Order | 1,342 | 3.74% |
| Legislation (Act) | 1,255 | 3.50% |
| Guidelines | 448 | 1.25% |
| Ordinance | 217 | 0.61% |
| Regulation | 166 | 0.46% |
### Major jurisdictions
| Jurisdiction | Documents | Share |
|---|---:|---:|
| Central | 14,946 | 41.69% |
| State (Maharashtra) | 1,855 | 5.17% |
| State (Uttar Pradesh) | 1,704 | 4.75% |
| State (Haryana) | 1,637 | 4.57% |
| State (Karnataka) | 1,575 | 4.39% |
| State (Rajasthan) | 1,470 | 4.10% |
| State (Bihar) | 1,135 | 3.17% |
| State (Tamil Nadu) | 896 | 2.50% |
| State (Punjab) | 884 | 2.47% |
| State (Delhi) | 849 | 2.37% |
| State (Jharkhand) | 848 | 2.37% |
| State (Assam) | 758 | 2.11% |
| State (Goa) | 639 | 1.78% |
| State (Kerala) | 477 | 1.33% |
| State (Odisha) | 467 | 1.30% |
## Time coverage
The dataset contains documents with parsed issue dates from **1970 to 2026**, with some machine-extracted date outliers also present. Around **28,823 documents** have parsed dates and **7,028 documents** do not have reliably parsed dates.
Recent year distribution includes:
| Year | Documents |
|---:|---:|
| 2026 | 65 |
| 2025 | 944 |
| 2024 | 1,259 |
| 2023 | 1,379 |
| 2022 | 1,240 |
| 2021 | 1,171 |
| 2020 | 1,422 |
| 2019 | 1,946 |
| 2018 | 1,738 |
| 2017 | 2,042 |
Date metadata is machine-extracted and should be treated as a useful filter, not as authoritative legal dating.
## Why this dataset exists
Indian legal documents are public in principle, but difficult to use at scale.
Acts, rules, notifications, circulars, and regulations are often scattered across government portals, gazettes, PDFs, scanned documents, inconsistent HTML pages, and fragmented archives. This makes them hard to use for modern AI, search, analytics, and legal research workflows.
KanoonGPT packages this data into an **AI-ready, query-friendly, tabular format** so builders can use it for:
- legal search and retrieval
- statutory RAG pipelines
- Indian legal NLP benchmarks
- document classification
- metadata extraction
- legal summarization
- legal copilots and agents
- downstream model training and evaluation
- public-interest legal research
## What this dataset contains
Each row represents one legal document.
The dataset includes minimal public metadata and cleaned document text. Source URLs and internal scraping provenance are intentionally not included in this public release.
The exported files are sorted by:
1. `document_type` ascending
2. `issue_date` descending
3. `doc_id` ascending
The dataset is stored as sharded Parquet files under:
```text
data/train-*.parquet
````
## Schema
| Column | Description |
| ----------------------- | ----------------------------------------------------------------------------------------------------------- |
| `doc_id` | Stable document identifier |
| `document_title` | Extracted document title |
| `document_type` | Extracted document category such as Act, Rules, Notification, Circular, Order, Regulation, Guidelines, etc. |
| `document_jurisdiction` | Extracted jurisdiction such as Central, State (Maharashtra), State (Delhi), etc. |
| `issuing_authority` | Extracted issuing authority, ministry, department, regulator, legislature, or government body |
| `issue_date` | Extracted issue/publication/enactment date when available |
| `short_description` | Short machine-generated description of the document |
| `text` | Cleaned document text converted from markdown |
## Example row
A row may include:
* a stable `doc_id`
* document title
* document type such as `Act`, `Rules`, `Notification`, or `Circular`
* jurisdiction such as `Central` or `State (Maharashtra)`
* issuing authority
* issue date when available
* short description
* cleaned full text for search, retrieval, and model training
## Loading
```python
from datasets import load_dataset
ds = load_dataset("KanoonGPT/indian-legal-documents")
print(ds["train"][0])
```
Load with streaming:
```python
from datasets import load_dataset
ds = load_dataset("KanoonGPT/indian-legal-documents", streaming=True)
for row in ds["train"]:
print(row["document_title"])
print(row["text"][:500])
break
```
Load with pandas:
```python
import pandas as pd
df = pd.read_parquet("hf://datasets/KanoonGPT/indian-legal-documents/data/train-00000.parquet")
print(df.head())
```
## Intended use
This dataset is intended for:
* Indian legal NLP research
* statutory search
* retrieval-augmented generation
* document classification
* legal information extraction
* legal summarization
* legal data analytics
* LLM pre-training, fine-tuning, and evaluation
* open-source legal-tech infrastructure
## Design principles
### AI-ready, not just archive-ready
This dataset is designed for downstream usage in search, retrieval, classification, analytics, and model-building.
### Minimal public schema
Only a compact set of useful public columns is included. The release intentionally avoids exposing internal scraping fields, source URLs, page-level splits, or pipeline metadata.
### Text-first
The `text` field is cleaned from markdown and normalized for easier model training and retrieval. The goal is to preserve document content while avoiding unnecessary page-split artifacts.
### Structured metadata
Important metadata such as title, type, jurisdiction, issuing authority, and issue date are exposed as columns so users can filter and analyze the corpus.
### Honest about quality
Legal documents at scale are messy. Metadata fields are machine-extracted and may contain errors, inconsistent labels, missing dates, or noisy jurisdiction/type values. Users should filter, inspect, and validate records for high-stakes use.
## Known limitations
* Metadata is machine-extracted and may contain mistakes.
* Some document types are noisy or overly specific.
* Some jurisdiction labels may be inconsistent or verbose.
* Some issue dates may be missing, incorrectly parsed, or outliers.
* Text is generated from scraped/OCR/PDF-derived markdown and may contain formatting artifacts.
* This dataset is not legal advice.
* Users should verify important legal facts against official sources before relying on them.
## Responsible use
* Verify important legal facts against official government sources before high-stakes use.
* Do not treat model outputs based on this dataset as legal advice.
* Add citations, validation, and human review layers in end-user legal systems.
* Respect applicable laws, privacy norms, and platform terms in downstream applications.
* Be careful when using machine-extracted metadata for legal or compliance-sensitive decisions.
## Why KanoonGPT is publishing this
We believe Indian legal AI needs **better open infrastructure**.
Open-source legal datasets help researchers, startups, students, public-interest builders, and enterprises work from a common foundation instead of repeatedly rebuilding the same ingestion and cleaning layer.
KanoonGPT’s goal is to contribute usable, structured Indian legal data that is easier to explore, benchmark, and build on.
## About KanoonGPT
KanoonGPT is building Indian legal datasets and data infrastructure for open-source, research, and enterprise AI applications.
**Coverage areas:**
* ⚖️ Case law
* 📜 Legal documents and statutes
* 🏷️ Legal metadata
* 🧩 Structured legal corpora
* 🔎 Legal search and retrieval infrastructure
Website: [kanoongpt.in](https://kanoongpt.in)
Related dataset: [KanoonGPT/indian-case-laws](https://huggingface.co/datasets/KanoonGPT/indian-case-laws)
## Licensing
The dataset is released under the **Apache License 2.0**.
## Citation
If you use this dataset, please cite the Hugging Face dataset.
```bibtex
@dataset{kanoongpt_indian_legal_documents,
author = {KanoonGPT},
title = {Indian Legal Documents},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/datasets/KanoonGPT/indian-legal-documents},
note = {Company website: https://kanoongpt.in}
}
```
提供机构:
KanoonGPT搜集汇总
数据集介绍

构建方式
印度法律文件长期以来散落于各政府门户、公报、扫描件及非结构化的HTML页面之中,给规模化应用带来了巨大挑战。为破解这一困局,KanoonGPT团队发起了开放法律数据倡议,系统性地从多元官方渠道搜集并整理了涵盖法案、规则、通知、通函、命令、条例、指南及法令等在内的法律文档。原始材料历经格式转换、文本清洗与元数据提取等精细化处理流程,最终以分片Parquet文件形式存储在单一数据目录下,总计汇集了35,851份结构清晰的法律文件,构建起一个AI就绪的标准化法律数据集。
特点
该数据集具有鲜明的结构化与多维性特征。每个样本均包含稳定文档标识符、文档标题、类型、管辖区域、发布机构、发布日期、简短描述及经过清洗的全文本内容共八个字段,便于用户按类型、管辖区、时间等维度进行灵活筛选与分析。文本长度跨度极大,中位数长约9,495字符,为下游自然语言处理任务提供了丰富的语义层级。数据时间覆盖1970年至2026年,横跨印度中央与多个邦级辖区,其中中央级文件占比逾四成,充分体现了印度法律体系的多元性与复杂性。
使用方法
用户可以借助Hugging Face Datasets库快速加载数据集,支持一次性加载与流式读取两种模式,后者尤其适合处理大规模长文本场景。亦可直接通过Pandas读取Parquet文件进行轻量化探索。数据集预设了文本生成、问答、特征提取、文本检索与排序、摘要等多种任务场景,特别适合用于法律领域的检索增强生成系统构建、文档分类、信息抽取、法律摘要生成以及大型语言模型的预训练与微调。使用者需注意元数据由机器自动提取,在关键应用场景下应参照官方原文进行复核验证。
背景与挑战
背景概述
印度法律文件数据集(Indian Legal Documents)由KanoonGPT团队于2026年发布,隶属于其推动印度法律数据开放获取的KanoonGPT Open Legal Data Initiative。该数据集聚焦于印度成文法及准法律文件的结构化整理,旨在解决法律文本长期分散于政府门户、公报、扫描件及异构网页中而难以规模化利用的痛点。核心研究问题是如何将公共领域原则下存在但碎片化的法律数据转化为人工智能就绪的格式,以支撑法律检索、判决预测、文档分类及大语言模型训练等下游任务。数据集包含35,851份涵盖法令、规则、通知、通告、指南等十余种类型的法律文档,时间跨度自1970年至2026年,覆盖中央及印度多邦的司法管辖区域。其发布为印度法律科技生态系统提供了可复用的基础数据基础设施,对开源法律研究、法律NLP基准建设及公共利益法律分析具有显著推动作用。
当前挑战
该数据集所应对的核心领域挑战在于印度法律文本数据的固有碎片化与异构性:法律文件分散于不同政府网站与陈旧格式中,缺乏统一的结构化标准,使得自动化检索、知识图谱构建及法律问答系统难以在统一语料上高效运作。构建过程中面临多重困难:元数据完全依赖机器提取,导致文档类型标签可能存在噪声或过于细碎,辖区标签存在不一致或冗长表述,发布日期字段存在缺失、解析错误或离群值等问题;文本源自网页抓取、光学字符识别及PDF衍生标记语言转换,难免残留格式伪影与排版异常;大量早期文件缺乏可靠日期信息,约7,028份文档无法提取有效发布日期。此外,确保数据质量透明与责任使用亦是关键挑战,数据集明确声明不得替代官方法律出处,并强调下游应用需增加验证与人工审核环节,以规避基于自动生成元数据的合规风险。
常用场景
经典使用场景
在印度法律文本分析与自然语言处理领域,Indian Legal Documents数据集凭借其涵盖法规、条例、通知、通告等多元法律文书类型的丰富语料,成为构建法律检索增强生成(RAG)管道的基石资源。研究者可通过该数据集进行法律文档的语义分类、元数据抽取以及生成式摘要等经典任务,例如利用其结构化元数据(如文档类型、管辖区域)训练分类模型,实现自动识别法律文书性质的功能。此外,该数据的文本字段经过清洗与规范化,为大规模语言模型的预训练与指令微调提供了优质语料,尤其适合需要理解印度法律语境的专业化AI系统开发。
实际应用
在实际产业应用中,该数据集赋能了法律科技领域的多项落地场景。法律科技公司可基于此数据构建面向律师与公民的智能法规检索工具,通过语义匹配快速定位相关法令与条文,大幅提升法律调研效率。企业合规部门能够利用训练后的模型自动审核商业合同与政府通知的合规性,例如识别最新发布的劳动法或环境法规对业务的影响。此外,该数据集还支撑了法律助手的开发,使其能够根据用户自然语言提问精准抽取法律定义或程序要求,为印度司法系统的数字化转型提供了关键的语料基础设施。
衍生相关工作
基于该数据集衍生了一系列影响深远的学术与工程成果。在检索增强生成领域,研究者以其作为外部知识源,设计出专门针对印度法律框架的RAG流水线,显著提升了法律问答的准确性与可溯源能力。在法律文本分类方向,后续工作在此基础上开发了多标签分类模型,能够区分法规、通知、通告等近十种文书类型,并在管辖区域与颁布机构维度上实现了细粒度判别。此外,该数据集还催生了法律摘要生成与判决预测等进阶任务,例如与其他案例法数据集联合使用,构建从法条到判决结果的端到端推理系统,推动了印度法律AI领域的开源基准建设。
以上内容由遇见数据集搜集并总结生成



