IL-PCSR / README.md
shounakpaul95's picture
Update README.md
28a7f9c verified
---
license: cc-by-nc-sa-4.0
task_categories:
- text-retrieval
language:
- en
extra_gated_fields:
Full Name: text
Affiliation (Organization/University): text
Designation/Status in Your Organization: text
Country: country
I want to use this dataset for (please provide the reason(s)): text
IL-PCSR dataset is free for research use but NOT for commercial use; do you agree if you are provided with the IL-PCSR dataset, you will NOT use for any commercial purposes? Also do you agree that you will not be sharing this dataset further or uploading it anywhere else on the internet: checkbox
DISCLAIMER The dataset is released for research purposes only and authors do not take any responsibility for any damage or loss arising due to usage of data or any system/model developed using the dataset: checkbox
tags:
- legal
- indian law
- legal retrieval
- statute retrieval
- precedent retrieval
size_categories:
- 1K<n<10K
pretty_name: IL-PCSR
config_names:
- queries
- statutes
- precedents
dataset_info:
- config_name: queries
features:
- name: id
dtype: string
- name: case_title
dtype: string
- name: date
dtype: string
- name: jurisdiction
dtype: string
- name: text
list: string
- name: rhetorical_roles
list: string
- name: relevant_statutes
list: string
- name: relevant_statute_ids
list: string
- name: relevant_precedents
list: string
- name: relevant_precedent_ids
list: string
splits:
- name: train_queries
num_examples: 5017
- name: dev_queries
num_examples: 627
- name: test_queries
num_examples: 627
- config_name: statutes
features:
- name: id
dtype: string
- name: provision_name
dtype: string
- name: text
list: string
splits:
- name: statute_candidates
num_examples: 936
- config_name: precedents
features:
- name: id
dtype: string
- name: case_title
dtype: string
- name: date
dtype: string
- name: jurisdiction
dtype: string
- name: text
list: string
- name: rhetorical_roles
list: string
- name: relevant_statutes
list: string
- name: relevant_statute_ids
list: string
- name: relevant_precedents
list: string
- name: relevant_precedent_ids
list: string
splits:
- name: precedent_candidates
num_examples: 3183
configs:
- config_name: queries
data_files:
- split: train_queries
path: train_queries*
- split: dev_queries
path: dev_queries*
- split: test_queries
path: test_queries*
default: true
- config_name: statutes
data_files:
- split: statute_candidates
path: statute_candidates*
- config_name: precedents
data_files:
- split: precedent_candidates
path: precedent_candidates*
---
# IL-PCSR (Indian Legal — Precedent & Statute Retrieval)
**IL-PCSR:** A dataset of Indian legal case **queries** annotated with relevant **statutes** and **precedents**, plus candidate pools of statutory provisions and precedent judgments for retrieval research.
---
## Dataset Summary
IL-PCSR contains three configs:
- `queries` — case queries (judgments / case descriptions) annotated with relevant statutes and precedents.
- `statutes` — statutory provisions (candidate documents).
- `precedents` — prior judgments (candidate documents).
---
## Languages
- **English** (Indian legal terminology and occasional code-switching).
---
## License & Access
- License: **CC-BY-NC-SA 4.0** (non-commercial, share-alike).
- This dataset is **gated**. To request access, users must complete the provided access form (the gate fields are defined in the front-matter). By requesting the dataset the user must explicitly agree to:
- Use the dataset **only for non-commercial research purposes**, and
- **Not further redistribute or upload** the dataset anywhere else.
- DISCLAIMER (must be accepted): the dataset is released for research purposes only; authors disclaim responsibility for any loss or damage from usage.
---
## Dataset structure (detailed)
The YAML in the front-matter contains exact `dataset_info` and `configs`. Below is a readable description of the same schema.
### Config: `queries` (default)
**Splits**
- `train_queries`: 5,017 examples
- `dev_queries`: 627 examples
- `test_queries`: 627 examples
**Fields / schema**
- `id`: *string* &rarr; unique id for the query.
- `case_title`: *string* &rarr; short title of the case.
- `date`: *string* &rarr; judgment date in ISO:YYYY-MM-DD format.
- `jurisdiction`: *string* &rarr; court or jurisdiction name.
- `text`: *list[string]* — tokenized/segmented text lines or paragraphs (stored as a list to preserve segments).
- `rhetorical_roles`: *list[string]* &rarr; role labels for each segment (aligned with `text` segments).
- \[`Facts`, `Issue`, `Argument by Petitioner`, `Argument by Respondent`, `Statute Analysis`, `Precedent Analysis`, `Court Disclosure`, `Court Reasoning`, `NONE`\]
- `relevant_statutes`: *list[string]* &rarr; human-readable statute names referenced as relevant.
- `relevant_statute_ids`: *list[string]* &rarr; canonical IDs matching the `statutes` config `id` field.
- `relevant_precedents`: *list[string]* &rarr; human-readable precedent case titles.
- `relevant_precedent_ids`: *list[string]* &rarr; canonical IDs matching the `precedents` config `id` field.
**Notes**
- `relevant_statute_ids` and `relevant_precedent_ids` are the fields used to build ground-truth relevance sets (qrels) for retrieval evaluation.
---
### Config: `statutes`
**Splits**
- `statute_candidates`: 936 examples
**Fields**
- `id`: *string* &rarr; unique provision id (matches `relevant_statute_ids` in `queries`).
- `provision_name`: *string* &rarr; statute/provision title.
- `text`: *list[string]* &rarr; provision text (segmented).
---
### Config: `precedents`
**Splits**
- `precedent_candidates`: 3,183 examples
**Fields / schema**
- Same as queries
---
## Data provenance & preprocessing
- **Sources:** Publicly available Indian judgments and statutory texts (collected from public repositories and court websites).
- **Curation steps (summary):**
- Document collection and deduplication.
- Minimal normalization (unicode normalisation, whitespace clean-up).
- Masking legal named entities and citations
- Rhetorical segments (Facts, Issues, Reasoning, Judgment) provided according to IndianKanoon in `rhetorical_roles`.
- Linking queries to statutes and precedents (producing the `relevant_*` fields).
- **PII & legal caution:** Users are responsible for additional PII removal or compliance checks; the dataset maintainers provide the data "as curated" and do not guarantee absence of sensitive information.
---
## How to use
All of the examples assume you have access (i.e., gate accepted).
### 1) Load from Hugging Face Hub
```python
from datasets import load_dataset
# Load queries config (default)
ds_queries = load_dataset("Exploration-Lab/IL-PCSR", name="queries")
# Access splits using the explicit split names
train_q = ds_queries["train_queries"]
dev_q = ds_queries["dev_queries"]
test_q = ds_queries["test_queries"]
# Example: inspect first query
print(train_q[0])
```
### 2) Load specific configs
```python
# Statutes (candidate pool)
ds_statutes = load_dataset("Exploration-Lab/IL-PCSR", name="statutes")
statute_pool = ds_statutes["statute_candidates"]
print(statute_pool[0])
# Precedents (candidate pool)
ds_precedents = load_dataset("Exploration-Lab/IL-PCSR", name="precedents")
precedent_pool = ds_precedents["precedent_candidates"]
print(precedent_pool[0])
```
### 3) Local development (loading from a local repo folder)
```python
# If you're testing locally (folder contains dataset script + README.md + data/)
ds_local_queries = load_dataset("</path/to/local/IL-PCSR>", name="queries")
print(ds_local_queries["train_queries"][0])
```
### 4) Building qrels (ground-truth) for retrieval evaluation
```python
# Example: build a qrels-like dict mapping query id -> set(candidate_ids)
def build_qrels(queries_split):
qrels = {}
for ex in queries_split:
qid = ex["id"]
# combine statute ids and precedent ids if you want a single candidate set
relevant = set(ex.get("relevant_statute_ids", []) + ex.get("relevant_precedent_ids", []))
qrels[qid] = list(relevant)
return qrels
qrels_train = build_qrels(train_q)
print("sample qrels:", list(qrels_train.items())[:2])
```
## Citation
```bibtex
@inproceedings{il-pcsr2025,
title = "IL-PCSR: Legal Corpus for Prior Case and Statute Retrieval",
author = "Paul, Shounak and Ghumare, Dhananjay and Goyal, Pawan and Ghosh, Saptarshi and Modi, Ashutosh"
booktitle = "Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing",
month = nov,
year = "2025",
address = "Suzhou, China",
publisher = "Association for Computational Linguistics",
note = "To Appear"
}
```