Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
pdf
pdf

Dataset For Indian Legal Knowledge Base

A curated, bilingual (English + Hindi) legal corpus for AI-powered Indian contract analysis — built for RAG pipelines, LLM fine-tuning, and legal NLP research.


About This Dataset

This dataset is the knowledge backbone of LegalEagle — an AI-powered contract review platform for Indian startups and freelancers. It contains Indian statutes, contract templates, landmark case references, and clause examples, curated specifically for retrieval-augmented generation (RAG) in the Indian legal domain.

All government statutes included are in the public domain (Government of India publications).


Dataset Structure

dataset/
├── acts/                          # Indian Statutes (English + Hindi)
│   ├── indian_contract_act_1872_eng.pdf
│   ├── indian_contract_act_1872_hindi.pdf
│   ├── arbitration_conciliation_act_1996.pdf
│   ├── arbitration_conciliation_act_1996_hindi.pdf
│   ├── specific_relief_act_1963_eng.pdf
│   ├── specific_relief_act_1963_hindi.pdf
│   ├── sale_of_goods_act_1930_eng.pdf
│   ├── sale_of_goods_act_1930_hindi.pdf
│   ├── indian_stamp_act_1899_eng.pdf
│   ├── indian_stamp_act_1899_hindi.pdf
│   └── information_technology_act_2000.pdf
│
├── templates/                     # Real Contract Templates
│   ├── nda_template.pdf
│   ├── employment_agreement.pdf
│   ├── vendor_agreement.pdf
│   └── sample_employment_agreement_template.pdf
│
├── cases/                         # Landmark Case References
│   ├── niranjan_shankar_golikari_case.pdf
│   ├── wrongful_termination_employment.pdf
│   ├── wrongful_termination_employment_case_2.pdf
│   ├── arbitration_cases.pdf
│   └── indemnity_contract_section_124.pdf
│
├── clauses/                       # Clause-Level References
│   ├── clause_type_reference.pdf
│   ├── risky_patterns_clause.pdf
│   ├── non_compete_clause.pdf
│   ├── non_compete_clause_2.pdf
│   └── arbitration_clause.pdf
│
└── knowledge_base/                # Structured Text Files
    └── clause_examples.txt        # Good vs Bad clause examples

Contents Summary

Indian Statutes Covered

Act Year Language
Indian Contract Act 1872 English + Hindi
Arbitration and Conciliation Act 1996 English + Hindi
Specific Relief Act 1963 English + Hindi
Sale of Goods Act 1930 English + Hindi
Indian Stamp Act 1899 English + Hindi
Information Technology Act 2000 English

Contract Templates Covered

Template Type
Non-Disclosure Agreement (NDA) Bilateral, India-specific
Employment Agreement With e-stamp, Indian jurisdiction
Vendor Agreement B2B, Indian startups
Sample Employment Template General purpose

Clause Types Covered

  • Non-Compete Clauses
  • Termination Clauses
  • Indemnity Clauses (Section 124 ICA)
  • Confidentiality / NDA Clauses
  • IP Assignment Clauses
  • Payment / Invoice Clauses
  • Dispute Resolution / Arbitration Clauses
  • Force Majeure Clauses

Intended Use

Primary Use Case

RAG (Retrieval-Augmented Generation) pipelines for Indian contract review:

from huggingface_hub import hf_hub_download
from sentence_transformers import SentenceTransformer
import fitz

# Download a file
path = hf_hub_download(
    repo_id="d-riti/Dataset-For-Indian-Legal-Knowledge-Base",
    filename="acts/indian_contract_act_1872_eng.pdf",
    repo_type="dataset"
)

# Extract text
doc = fitz.open(path)
text = "\n".join(page.get_text() for page in doc)

Suitable For

  • RAG pipelines for legal Q&A
  • LLM fine-tuning on Indian legal text
  • Legal clause classification
  • Contract risk analysis
  • Legal NLP research
  • Indian law chatbots

Not Suitable For

  • Actual legal advice (not a substitute for a lawyer)
  • Jurisdictions outside India
  • ❌Real-time case law (static dataset)

Recommended Extraction Pipeline

import fitz          # PyMuPDF — for text PDFs
import pdfplumber    # for tables in contracts

def extract_legal_pdf(pdf_path: str) -> str:
    full_text = ""
    
    # Extract text (handles English + Hindi)
    doc = fitz.open(pdf_path)
    for page in doc:
        page_text = page.get_text()
        if len(page_text.strip()) > 50:  # skip image/stamp pages
            full_text += page_text + "\n"
    
    # Extract tables (for agreement templates)
    with pdfplumber.open(pdf_path) as pdf:
        for page in pdf.pages:
            for table in page.extract_tables():
                for row in table:
                    row_text = " | ".join(
                        str(cell) if cell else "" for cell in row
                    )
                    if row_text.strip():
                        full_text += row_text + "\n"
    
    return full_text.strip()

Languages

Language Content Script
English Statutes, templates, cases, clauses Latin
Hindi Statutes (parallel corpus) Devanagari

All Hindi PDFs contain selectable text (not scanned) — no OCR required.


Legal Disclaimer

  • All Indian government statutes are sourced from official Government of India publications and are in the public domain.
  • Contract templates are included for educational and research purposes only.
  • This dataset does not constitute legal advice.
  • Users are responsible for verifying the accuracy and currency of all legal content.

Citation

If you use this dataset in your research or project, please cite:

@dataset{legaleagle_indian_legal_kb_2026,
  author    = {Riti Dube},
  title     = {Dataset For Indian Legal Knowledge Base},
  year      = {2026},
  publisher = {Hugging Face},
  url       = {https://huggingface.co/datasets/d-riti/Dataset-For-Indian-Legal-Knowledge-Base},
  note      = {Bilingual Indian legal corpus for RAG and legal NLP}
}

Related Project

This dataset powers LegalEagle — an AI contract review platform for Indian startups.

  • Stack: FastAPI + React + LangChain + RAG + Groq (Llama 3)
  • Features: Clause-by-clause risk analysis, Indian law citations, PDF report export
  • GitHub: github.com/Ritidube/legaleagle

Author

Riti Dube


Built with ❤️ for the Indian legal-tech ecosystem

Downloads last month
198