GSMS-B commited on
Commit
ed63dfa
·
verified ·
1 Parent(s): 2dad02d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +343 -0
README.md CHANGED
@@ -1,3 +1,346 @@
1
  ---
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
  license: apache-2.0
5
+ tags:
6
+ - legal
7
+ - indian-law
8
+ - criminal-law
9
+ - bns
10
+ - bnss
11
+ - bsa
12
+ - bharatiya-nyaya-sanhita
13
+ - bharatiya-nagarik-suraksha-sanhita
14
+ - bharatiya-sakshya-adhiniyam
15
+ - bharatiya-nyaya-sanhita-2023
16
+ - bharatiya-nagarik-suraksha-sanhita-2023
17
+ - bharatiya-sakshya-adhiniyam-2023
18
+ - indian-penal-code-replacement
19
+ - code-of-criminal-procedure-replacement
20
+ - indian-evidence-act-replacement
21
+ - indian-criminal-law
22
+ - indian-legal-nlp
23
+ - law
24
+ - rag
25
+ - retrieval-augmented-generation
26
+ - question-answering
27
+ - text-classification
28
+ - feature-extraction
29
+ - legal-ai
30
+ - legal-nlp
31
+ - structured-legal-data
32
+ - nlp
33
+ pretty_name: Indian Legal Sections — BNS, BNSS & BSA 2023 (Structured JSON)
34
+ size_categories:
35
+ - 1K<n<10K
36
+ task_categories:
37
+ - question-answering
38
+ - text-classification
39
+ - feature-extraction
40
  ---
41
+
42
+ <div align="center">
43
+
44
+ ![Dataset Banner](banner.png)
45
+
46
+ # 🏛️ Indian Legal Sections — BNS · BNSS · BSA 2023
47
+
48
+ ### The First Structured, Unified JSON Dataset of Modern Indian Criminal Law
49
+
50
+ ![Sections](https://img.shields.io/badge/Total%20Sections-1%2C059-navy?style=for-the-badge)
51
+ ![Acts](https://img.shields.io/badge/Acts%20Covered-3-orange?style=for-the-badge)
52
+ ![Chapters](https://img.shields.io/badge/Total%20Chapters-71-darkgreen?style=for-the-badge)
53
+ ![Format](https://img.shields.io/badge/Format-Structured%20JSON-blue?style=for-the-badge&logo=json)
54
+ ![License](https://img.shields.io/badge/License-Apache%202.0-green?style=for-the-badge)
55
+ ![Language](https://img.shields.io/badge/Language-English-red?style=for-the-badge)
56
+ ![Status](https://img.shields.io/badge/Verified-100%25%20Accurate-brightgreen?style=for-the-badge)
57
+
58
+ </div>
59
+
60
+ ---
61
+
62
+ ## 📖 Dataset Summary
63
+
64
+ This dataset contains **1,059 fully structured and verified sections** extracted, parsed, and unified from India's three landmark criminal justice reform acts passed in December 2023. These three acts together replaced the colonial-era Indian Penal Code (IPC, 1860), the Code of Criminal Procedure (CrPC, 1973), and the Indian Evidence Act (IEA, 1872). They received Presidential assent on **December 25, 2023** and came into force on **July 1, 2024** — representing the most sweeping overhaul of India's criminal justice system in over 150 years. They are named as 2023 acts because that is the year of their parliamentary passage and enactment.
65
+
66
+ > [!IMPORTANT]
67
+ > **Verified Accuracy:** This dataset contains exactly **1,059 unified sections** mapping the complete current framework of modern Indian criminal law across all three acts, structured in a consistent JSON schema designed for immediate use in RAG pipelines, fine-tuning workflows, and legal NLP research.
68
+
69
+ <div align="center">
70
+
71
+ | Act | Full Name | 🔄 Replaces | 📚 Chapters | 📄 Sections |
72
+ | :--- | :--- | :--- | :---: | :---: |
73
+ | **BNS 2023** | Bharatiya Nyaya Sanhita, 2023 | Indian Penal Code, 1860 | 20 | 358 |
74
+ | **BNSS 2023** | Bharatiya Nagarik Suraksha Sanhita, 2023 | Code of Criminal Procedure, 1973 | 39 | 531 |
75
+ | **BSA 2023** | Bharatiya Sakshya Adhiniyam, 2023 | Indian Evidence Act, 1872 | 12 | 170 |
76
+ | **Total** | | | **71** | **1,059** |
77
+
78
+ </div>
79
+
80
+ All three acts operate together in every criminal case in India. The **BNS** defines what constitutes a crime and prescribes the punishment for it. The **BNSS** governs the entire criminal procedure from FIR registration through investigation, bail, charge, trial, judgment, and execution of sentence. The **BSA** determines what evidence is admissible in court and how it must be proved. This dataset unifies all 1,059 sections from all three acts into a single consistent machine-readable JSON format.
81
+
82
+ ---
83
+
84
+ ## 🏛️ Background: Why These Acts Matter
85
+
86
+ India's criminal justice system was governed for over 160 years by three laws written under British colonial administration. The Indian Penal Code (1860) defined crimes, the Code of Criminal Procedure (1973) governed how those crimes were investigated and tried, and the Indian Evidence Act (1872) governed what could be presented as proof in court.
87
+
88
+ The BNS, BNSS, and BSA were passed by the Parliament of India in the Winter Session of December 2023. They modernize the criminal justice framework by introducing:
89
+
90
+ - ⚖️ Provisions for organised crime and terrorism as distinct offences
91
+ - 💻 Electronic records recognized as **primary evidence** (not secondary)
92
+ - ⏱️ Mandatory timelines for investigation and trial completion
93
+ - 🤝 Community service introduced as a form of punishment
94
+ - 📋 Zero FIR provisions allowing registration at any police station regardless of jurisdiction
95
+ - 🆔 Updated definitions of offences to reflect 21st-century realities
96
+
97
+ For AI and NLP researchers, legal technologists, and developers building Indian legal AI systems, these three acts are the foundational texts of modern Indian criminal law and the correct source for any system targeting the current legal framework.
98
+
99
+ ---
100
+
101
+ ## 🗂️ Dataset Structure
102
+
103
+ ### JSON Schema
104
+
105
+ Each of the 1,059 entries is a JSON object with the following structure:
106
+
107
+ ```json
108
+ {
109
+ "chunk_id": "BNS_101",
110
+ "text": "[Context: This section is from BNS 2023, CHAPTER VI OF OFFENCES AFFECTING THE HUMAN BODY. It covers Section 101: Murder.]\n\n101. Murder.— Except in the cases hereinafter excepted, culpable homicide is murder,—\n(a) if the act by which the death is caused is done with the intention of causing death; or\n(b) if the act by which the death is caused is done with the intention of causing such bodily injury as the offender knows to be likely to cause the death of the person to whom the harm is caused; or\n...",
111
+ "section_number": "101",
112
+ "section_title": "Murder",
113
+ "chapter": "CHAPTER VI OF OFFENCES AFFECTING THE HUMAN BODY",
114
+ "act": "BNS 2023",
115
+ "source_label": "Section 101, BNS 2023"
116
+ }
117
+ ```
118
+
119
+ ### 📋 Field Descriptions
120
+
121
+ | Field | Type | Description |
122
+ | :--- | :---: | :--- |
123
+ | `chunk_id` | string | Unique identifier in format `ACT_SectionNumber`. BNS: `BNS_1`→`BNS_358`. BNSS: `BNSS_1`→`BNSS_531`. BSA: `BSA_1`→`BSA_170`. Prefixed per act, not globally sequential. |
124
+ | `text` | string | Complete self-contained section text. Includes a prepended context header identifying the act and chapter, followed by the full section body with all sub-clauses, illustrations, exceptions, explanations, and provisos. Primary content field. |
125
+ | `section_number` | string | Official section number as it appears in the act (e.g., `"101"`, `"47"`, `"3"`). |
126
+ | `section_title` | string | Official title of the section as it appears in the act (e.g., `"Murder"`, `"Arrest without warrant"`). |
127
+ | `chapter` | string | Full chapter heading under which this section falls within its respective act. |
128
+ | `act` | string | Source act. Exactly one of: `"BNS 2023"`, `"BNSS 2023"`, or `"BSA 2023"`. |
129
+ | `source_label` | string | Human-readable citation string (e.g., `"Section 101, BNS 2023"`). Designed for direct use as a citation tag in RAG outputs. |
130
+
131
+ ### 🧱 Text Field Design
132
+
133
+ Every `text` field is intentionally structured with a context header prepended before the section content, making each chunk fully self-contained for RAG pipelines:
134
+
135
+ ```
136
+ [Context: This section is from BNS 2023, CHAPTER VI OF OFFENCES AFFECTING THE HUMAN BODY.
137
+ It covers Section 101: Murder.]
138
+
139
+ 101. Murder.— Except in the cases hereinafter excepted, culpable homicide is murder,—
140
+ (a) if the act by which the death is caused is done with the intention of causing death; or
141
+ (b) if the act by which the death is caused is done with the intention of causing such bodily
142
+ injury as the offender knows to be likely to cause the death of the person to whom the harm is caused; or
143
+ ...
144
+ Exception 1.— Culpable homicide is not murder if the offender, whilst deprived of the power of
145
+ self-control by grave and sudden provocation...
146
+ Illustration.
147
+ (a) A shoots Z with the intention of killing him. Z dies in consequence. A commits murder.
148
+ ```
149
+
150
+ ---
151
+
152
+ ## 📊 Dataset Statistics
153
+
154
+ <div align="center">
155
+
156
+ | 📏 Metric | ✅ Value |
157
+ | :--- | :---: |
158
+ | Total sections (chunks) | **1,059** |
159
+ | BNS 2023 sections | 358 |
160
+ | BNSS 2023 sections | 531 |
161
+ | BSA 2023 sections | 170 |
162
+ | BNS 2023 chapters | 20 |
163
+ | BNSS 2023 chapters | 39 |
164
+ | BSA 2023 chapters | 12 |
165
+ | Total chapters across all three acts | **71** |
166
+ | Total fields per entry | 7 |
167
+
168
+ </div>
169
+
170
+ ---
171
+
172
+ ## 📚 Coverage by Act
173
+
174
+ ### ⚖️ BNS 2023 — Bharatiya Nyaya Sanhita (358 sections, 20 chapters)
175
+
176
+ The BNS is the substantive criminal law of India — it defines every offence and its punishment.
177
+
178
+ <details>
179
+ <summary><b>📐 Click to expand full chapter coverage — BNS 2023 (20 Chapters)</b></summary>
180
+
181
+ - **Chapter I** — Preliminary definitions and applicability of the act
182
+ - **Chapter II** — Punishments (imprisonment, fine, forfeiture of property, community service)
183
+ - **Chapter III** — General exceptions (child, unsound mind, intoxication, consent, necessity, private defence)
184
+ - **Chapter IV** — Abetment, criminal conspiracy, and attempt
185
+ - **Chapter V** — Offences against women and children (sexual assault, rape, trafficking, child exploitation)
186
+ - **Chapter VI** — Offences affecting the human body (murder, culpable homicide, grievous hurt, assault, kidnapping, abduction, wrongful confinement)
187
+ - **Chapter VII** — Offences against the state (waging war, seditious acts, terrorist acts)
188
+ - **Chapter VIII** — Offences relating to the Army, Navy and Air Force
189
+ - **Chapter IX** — Offences relating to elections
190
+ - **Chapter X** — Offences relating to coin, currency notes, bank notes and government stamps
191
+ - **Chapter XI** — Offences against public tranquility (unlawful assembly, rioting, affray)
192
+ - **Chapter XII** — Offences by or relating to public servants (bribery, corruption, misconduct)
193
+ - **Chapter XIII** — Contempts of the lawful authority of public servants
194
+ - **Chapter XIV** — False evidence and offences against public justice (perjury, fabricating evidence, obstructing justice)
195
+ - **Chapter XV** — Offences affecting public health, safety, convenience, decency and morals
196
+ - **Chapter XVI** — Offences relating to religion
197
+ - **Chapter XVII** — Offences against property (theft, extortion, robbery, dacoity, cheating, fraud, mischief, criminal trespass)
198
+ - **Chapter XVIII** — Offences relating to documents and property marks (forgery, counterfeiting)
199
+ - **Chapter XIX** — Criminal intimidation, insult, annoyance, defamation
200
+ - **Chapter XX** — Repeal and savings
201
+
202
+ </details>
203
+
204
+ ---
205
+
206
+ ### 🏛️ BNSS 2023 — Bharatiya Nagarik Suraksha Sanhita (531 sections, 39 chapters)
207
+
208
+ The BNSS is the procedural criminal law of India — it governs every step of the criminal justice process from the moment a crime is reported to the final execution of a sentence. With 531 sections across 39 chapters it is the largest of the three acts and the most comprehensive component of this dataset.
209
+
210
+ <details>
211
+ <summary><b>📐 Click to expand full chapter coverage — BNSS 2023 (39 Chapters)</b></summary>
212
+
213
+ - **Chapter I** — Preliminary definitions and interpretation
214
+ - **Chapter II** — Constitution of criminal courts and offices
215
+ - **Chapter III** — Powers of courts (Magistrate, Sessions, High Court)
216
+ - **Chapter IV** — Powers of superior officers of police and aid to magistrates
217
+ - **Chapter V** — Arrest of persons (with and without warrant, rights of arrested persons, medical examination)
218
+ - **Chapter VI** — Processes to compel appearance (summons, warrant, proclamation, attachment)
219
+ - **Chapter VII** — Processes to compel production of things (search warrants, general search)
220
+ - **Chapter VIII** — Reciprocal arrangements for assistance in certain matters
221
+ - **Chapter IX** — Security for keeping the peace and for good behaviour
222
+ - **Chapter X** — Order for maintenance of wives, children and parents
223
+ - **Chapter XI** — Maintenance of public order and tranquility
224
+ - **Chapter XII** — Preventive action of the police
225
+ - **Chapter XIII** — Information to the police and their powers to investigate (FIR, Zero FIR, investigation procedure, charge sheet)
226
+ - **Chapter XIV** — Jurisdiction of criminal courts in inquiries and trials
227
+ - **Chapter XV** — Conditions requisite for initiation of proceedings
228
+ - **Chapter XVI** — Complaints to magistrates
229
+ - **Chapter XVII** — Commencement of proceedings before magistrates
230
+ - **Chapter XVIII** — The charge (framing, joinder, alteration of charges)
231
+ - **Chapter XIX** — Trial before a Court of Session
232
+ - **Chapter XX** — Trial of warrant-cases by magistrates
233
+ - **Chapter XXI** — Trial of summons-cases by magistrates
234
+ - **Chapter XXII** — Summary trials
235
+ - **Chapter XXIII** — Plea bargaining
236
+ - **Chapter XXIV** — Attendance of persons confined or detained in prisons
237
+ - **Chapter XXV** — Evidence in inquiries and trials
238
+ - **Chapter XXVI** — General provisions as to inquiries and trials
239
+ - **Chapter XXVII** — Provisions as to accused persons of unsound mind
240
+ - **Chapter XXVIII** — Provisions as to offences affecting the administration of justice
241
+ - **Chapter XXIX** — The judgment
242
+ - **Chapter XXX** — Submission of death sentences for confirmation
243
+ - **Chapter XXXI** — Appeals
244
+ - **Chapter XXXII** — Reference and revision
245
+ - **Chapter XXXIII** — Transfer of criminal cases
246
+ - **Chapter XXXIV** — Execution, suspension, remission and commutation of sentences
247
+ - **Chapter XXXV** — Provisions as to bail and bonds
248
+ - **Chapter XXXVI** — Disposal of property
249
+ - **Chapter XXXVII** — Irregular proceedings
250
+ - **Chapter XXXVIII** — Limitation for taking cognizance of certain offences
251
+ - **Chapter XXXIX** — Miscellaneous provisions
252
+
253
+ </details>
254
+
255
+ ---
256
+
257
+ ### 📜 BSA 2023 — Bharatiya Sakshya Adhiniyam (170 sections, 12 chapters)
258
+
259
+ The BSA is the law of evidence in India — it governs what facts can be proved in court, how they must be proved, and what standards apply.
260
+
261
+ <details>
262
+ <summary><b>📐 Click to expand full chapter coverage — BSA 2023 (12 Chapters)</b></summary>
263
+
264
+ - **Chapter I** — Preliminary definitions and interpretation
265
+ - **Chapter II** — Relevancy of Facts (admissions, confessions, statements by persons who cannot be called as witnesses, expert opinion, character evidence)
266
+ - **Chapter III** — Facts Which Need Not Be Proved (judicially noticeable facts, admitted facts)
267
+ - **Chapter IV** — Of Oral Evidence (firsthand evidence requirement, electronic evidence as oral evidence)
268
+ - **Chapter V** — Of Documentary Evidence (primary and secondary evidence, electronic records as primary evidence, production of documents)
269
+ - **Chapter VI** — Of the Exclusion of Oral Evidence by Documentary Evidence
270
+ - **Chapter VII** — Of the Burden of Proof (general burden, special rules for specific offences, presumptions)
271
+ - **Chapter VIII** — Estoppel
272
+ - **Chapter IX** — Of Witnesses (competency, privilege, compellability)
273
+ - **Chapter X** — Of Examination of Witnesses (order of examination, cross-examination, leading questions, hostile witnesses, refreshing memory, impeaching credit)
274
+ - **Chapter XI** — Of Improper Admission and Rejection of Evidence
275
+ - **Chapter XII** — Repeal and Savings
276
+
277
+ </details>
278
+
279
+ ---
280
+
281
+ ## 🎯 Intended Uses
282
+
283
+ > [!NOTE]
284
+ > This dataset was built with three primary use cases in mind — RAG pipelines, fine-tuning, and multi-agent legal AI systems.
285
+
286
+ **🔍 RAG Systems for Indian Legal Q&A**
287
+ Each chunk is fully self-contained with its context header, making it directly usable with embedding models such as `BAAI/bge-base-en-v1.5`, `sentence-transformers/all-MiniLM-L6-v2`, or `intfloat/multilingual-e5-base`, and vector databases such as ChromaDB, FAISS, Pinecone, LanceDB, or Weaviate. The `source_label` field is designed for direct use as a citation tag in generated outputs.
288
+
289
+ **🤖 Fine-tuning Legal Language Models**
290
+ The structured format with section titles, chapter context, act attribution, and full legal text including illustrations and exceptions is well-suited for generating synthetic instruction-response pairs for supervised fine-tuning (SFT) of small language models on Indian criminal law.
291
+
292
+ **🕸️ Legal AI Agents and Multi-Agent Systems**
293
+ The per-act structure enables building multi-agent systems where specialized agents handle different aspects of a legal query — a BNS agent for crime identification and punishment, a BNSS agent for procedural guidance, and a BSA agent for evidence requirements.
294
+
295
+ **📊 Legal NLP Research**
296
+ Section classification, legal named entity recognition, cross-act relationship mapping, legal question answering, and Indian criminal law language modeling.
297
+
298
+ **📚 Legal Education and Reference Tools**
299
+ Building tools that help law students, legal aid workers, journalists, and citizens understand the new criminal laws of India.
300
+
301
+ > [!WARNING]
302
+ > This dataset is intended for research, education, and development purposes only. It must not be used as a substitute for qualified legal advice. The dataset represents the text of the acts as extracted via automated PDF parsing and may contain minor formatting artifacts. Users should verify critical legal text against the official Government of India Gazette notifications.
303
+
304
+ ---
305
+
306
+ ## 🔧 Source and Parsing Methodology
307
+
308
+ **Source:** Official text of BNS 2023, Bharatiya Nagarik Suraksha Sanhita 2023, and Bharatiya Sakshya Adhiniyam 2023 as published by the Government of India.
309
+
310
+ **Enactment timeline:** All three acts were passed by the Parliament of India in the Winter Session of December 2023. They received Presidential assent on December 25, 2023. They are named as 2023 acts because that is the year of parliamentary passage and enactment. They came into force on **July 1, 2024**, replacing the IPC, CrPC, and IEA from that date.
311
+
312
+ **Parsing methodology:** PDF documents were parsed using `pdfplumber` for text extraction. Section boundaries were identified using rule-based chunking that detects section number patterns in the extracted text. Each section was extracted with its complete content including all sub-clauses, illustrations, exceptions, explanations, and provisos. A context header was prepended to each chunk for RAG compatibility. All 1,059 sections across the three acts were validated for completeness and correct attribution before final export to JSON.
313
+
314
+ ---
315
+
316
+ ## 📎 Citation
317
+
318
+ If you use this dataset in your research or projects, please cite:
319
+
320
+ ```bibtex
321
+ @dataset{indian_legal_sections_bns_bnss_bsa_2023,
322
+ title = {Indian Legal Sections — BNS, BNSS and BSA 2023 (Structured JSON)},
323
+ author = {GSMS-B},
324
+ year = {2024},
325
+ publisher = {HuggingFace},
326
+ url = {https://huggingface.co/datasets/GSMS-B/indian-legal-sections-bns-bnss-bsa-2023}
327
+ }
328
+ ```
329
+
330
+ ---
331
+
332
+ ## 📄 License
333
+
334
+ This dataset is released under the **Apache 2.0 License**.
335
+
336
+ The underlying legal texts — Bharatiya Nyaya Sanhita 2023, Bharatiya Nagarik Suraksha Sanhita 2023, and Bharatiya Sakshya Adhiniyam 2023 — are official Government of India legislative documents published in the Official Gazette and are in the public domain under Indian copyright law as government works.
337
+
338
+ ---
339
+
340
+ <div align="center">
341
+
342
+ Made with ❤️ for the Indian Legal AI Research Community
343
+
344
+ [![HuggingFace](https://img.shields.io/badge/🤗%20HuggingFace-GSMS--B-yellow?style=for-the-badge)](https://huggingface.co/GSMS-B)
345
+
346
+ </div>