|
Download README.md from Exploration-Lab/CS-781-Capstone: direct link, hf CLI and curl.
- Browser
- Download file 16.1 kB
-
https://huggingface.co/datasets/Exploration-Lab/CS-781-Capstone/resolve/main/README.md
- Command line
-
hf download hf://datasets/Exploration-Lab/CS-781-Capstone/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/datasets/Exploration-Lab/CS-781-Capstone/resolve/main/README.md
16.1 kB
| configs: | |
| - config_name: phase_1 | |
| data_files: | |
| - split: train | |
| path: | |
| - Phase_1_Pretraining/Train/train_acts.json | |
| - Phase_1_Pretraining/Train/train_high_courts.json | |
| - Phase_1_Pretraining/Train/train_supreme_court.json | |
| - Phase_1_Pretraining/Train/train_tribunals.json | |
| - split: test | |
| path: Phase_1_Pretraining/Test/test.json | |
| - config_name: phase_2 | |
| data_files: | |
| - split: train | |
| path: | |
| - Phase_2_LNER/Train/fold1-text.json | |
| - Phase_2_LNER/Train/fold1-gold.json | |
| - Phase_2_LNER/Train/fold2-text.json | |
| - Phase_2_LNER/Train/fold2-gold.json | |
| - Phase_2_LNER/Train/labels.txt | |
| - split: test | |
| path: Phase_2_LNER/Test/fold3-text.json | |
| - config_name: phase_3 | |
| data_files: | |
| - split: train | |
| path: | |
| - Phase_3_RR/Train/CL_train.json | |
| - Phase_3_RR/Train/IT_train.json | |
| - split: validation | |
| path: | |
| - Phase_3_RR/Train/CL_dev.json | |
| - Phase_3_RR/Train/IT_dev.json | |
| - split: test | |
| path: | |
| - Phase_3_RR/Test/CL_test.json | |
| - Phase_3_RR/Test/IT_test.json | |
| - config_name: phase_4 | |
| data_files: | |
| - split: train | |
| path: Phase_4_CJPE/Train/train.json | |
| - split: validation | |
| path: Phase_4_CJPE/Train/dev.json | |
| - split: test | |
| path: Phase_4_CJPE/Test/test.json | |
| - config_name: phase_5 | |
| data_files: | |
| - split: train | |
| path: Phase_5_LSI/Train/train.json | |
| - split: validation | |
| path: Phase_5_LSI/Train/dev.json | |
| - split: test | |
| path: Phase_5_LSI/Test/test.json | |
| - config_name: phase_6 | |
| data_files: | |
| - split: train | |
| path: Phase_6_Summ/Train/train.json | |
| - split: test | |
| path: Phase_6_Summ/Test/test.json | |
| - config_name: phase_7 | |
| data_files: | |
| - split: train | |
| path: | |
| - Phase_7_PCR/Train/train.json | |
| - Phase_7_PCR/Train/train_candidates.json | |
| - split: validation | |
| path: | |
| - Phase_7_PCR/Dev/dev.json | |
| - Phase_7_PCR/Dev/dev_candidates.json | |
| - split: test | |
| path: | |
| - Phase_7_PCR/Test/test.json | |
| - Phase_7_PCR/Test/test_candidates.json | |
| # Legal Language Modelling Challenge — CS-781 Capstone | |
| This repository contains the datasets for all seven phases of the **Legal Language Modelling Challenge (CS-781 Capstone)**. | |
| The challenge covers a range of legal NLP tasks, progressing from legal language modelling and information extraction to rhetorical role prediction, case judgement prediction, legal statute identification, legal summarization, and prior case retrieval. | |
| ## Dataset Overview | |
| | Phase | Task | Train | Dev | Test | | |
| | --- | --- | --- | --- | --- | | |
| | Phase 1 | Legal Language Model Pre-training | ✓ | — | ✓ | | |
| | Phase 2 | Legal Named Entity Recognition (L-NER) | ✓ | — | ✓ | | |
| | Phase 3 | Rhetorical Role Prediction (RR) | ✓ | ✓ | ✓ | | |
| | Phase 4 | Case Judgement Prediction (CJPE) | ✓ | ✓ | ✓ | | |
| | Phase 5 | Legal Statute Identification (LSI) | ✓ | ✓ | ✓ | | |
| | Phase 6 | Legal Summarization | ✓ | — | ✓ | | |
| | Phase 7 | Prior Case Retrieval (PCR) | ✓ | ✓ | ✓ | | |
| --- | |
| # Phase 1 — Legal Language Model Pre-training | |
| ## Task | |
| The objective of this phase is to train a compact legal language model from scratch and generate a continuation for a given legal-text prompt. | |
| ## Dataset Structure | |
| ```text | |
| Phase_1_Pretraining/ | |
| ├── Train/ | |
| │ ├── train_acts.json | |
| │ ├── train_high_courts.json | |
| │ ├── train_supreme_court.json | |
| │ └── train_tribunals.json | |
| │ | |
| └── Test/ | |
| └── test.json | |
| ``` | |
| ## Training Data | |
| The training corpus contains more than **4.5 billion tokens** of legal text, provided in JSON format. | |
| The training files contain legal text records. | |
| ## Test Data | |
| Each test example consists of a 512-word legal-text prompt: | |
| ```json | |
| { | |
| "1": { | |
| "text": "The issue involved in these petitions is as to whether ..." | |
| }, | |
| "2": { | |
| "text": "In ..." | |
| } | |
| } | |
| ``` | |
| The model must generate the next 128 words for every test prompt. | |
| ## Expected Submission Format | |
| The prediction file must be named `prediction.json` and contain one prediction for every test ID: | |
| ```json | |
| { | |
| "1": { | |
| "text": "Generated 128-word continuation ..." | |
| }, | |
| "2": { | |
| "text": "Generated 128-word continuation ..." | |
| } | |
| } | |
| ``` | |
| The `text` field must contain only the generated continuation and must not include the original 512-word prompt. | |
| ## Evaluation | |
| * **Primary:** BERTScore F1 | |
| * **Secondary:** ROUGE-L F1, BLEU-4 | |
| --- | |
| # Phase 2 — Legal Named Entity Recognition (L-NER) | |
| ## Task | |
| The objective of this phase is to perform named entity recognition over Indian legal documents using character-level entity spans. | |
| ## Dataset Structure | |
| ```text | |
| Phase_2_LNER/ | |
| ├── Train/ | |
| │ ├── fold1-text.json | |
| │ ├── fold1-gold.json | |
| │ ├── fold2-text.json | |
| │ ├── fold2-gold.json | |
| │ └── labels.txt | |
| │ | |
| └── Test/ | |
| └── fold3-text.json | |
| ``` | |
| ## Training Data | |
| The training text files contain document IDs mapped to their complete document text: | |
| ```json | |
| { | |
| "115651329": "REPORTABLE IN THE SUPREME COURT OF INDIA ..." | |
| } | |
| ``` | |
| The training gold files contain the corresponding entity annotations: | |
| ```json | |
| { | |
| "115651329": [ | |
| [137, 153, "RESP", "STATE OF HARYANA"], | |
| [252, 261, "DATE", "19.8.2011"], | |
| [276, 308, "COURT", "High Court of Punjab and Haryana"] | |
| ] | |
| } | |
| ``` | |
| Each annotation follows: | |
| `[start_character, end_character, label, entity_text]` | |
| The `labels.txt` file contains the permitted entity labels. | |
| ## Test Data | |
| The test data contains only the documents: | |
| ```json | |
| { | |
| "1128835": "REPORTABLE IN THE SUPREME COURT OF INDIA ..." | |
| } | |
| ``` | |
| The corresponding entity annotations are private. | |
| ## Expected Submission Format | |
| Predictions are provided as a JSON object keyed by document ID: | |
| ```json | |
| { | |
| "1128835": [ | |
| [18, 40, "COURT"], | |
| [114, 162, "CASENO"], | |
| [213, 229, "RESP"] | |
| ] | |
| } | |
| ``` | |
| Each prediction must contain: | |
| `[start_character, end_character, label]` | |
| An optional fourth field containing the entity text is also permitted: | |
| `[start_character, end_character, label, entity_text]` | |
| The entity text is not used for scoring. The character span and entity label must exactly match the private annotation. | |
| ## Evaluation | |
| * **Primary:** Strict Macro-F1 across the 12 entity labels | |
| * **Secondary:** Strict Macro-Precision, Strict Macro-Recall | |
| --- | |
| # Phase 3 — Rhetorical Role Prediction (RR) | |
| ## Task | |
| The objective of this phase is to predict the rhetorical role of each sentence in a legal document. | |
| The dataset covers two legal domains: | |
| * **CL** — Corporate Law | |
| * **IT** — Information Technology | |
| ## Dataset Structure | |
| ```text | |
| Phase_3_RR/ | |
| ├── Train/ | |
| │ ├── CL_train.json | |
| │ ├── CL_dev.json | |
| │ ├── IT_train.json | |
| │ ├── IT_dev.json | |
| │ └── label_vocab.json | |
| │ | |
| └── Test/ | |
| ├── CL_test.json | |
| └── IT_test.json | |
| ``` | |
| ## Training Data | |
| Each document contains a list of sentences and a corresponding list of rhetorical-role labels: | |
| ```json | |
| { | |
| "id": "CCI_Noida_Software_Technology_Park_Ltd_vs_Star_India...", | |
| "text": [ | |
| "Noida Software Technology Park Limited ...", | |
| "The Commission observed that ..." | |
| ], | |
| "labels": [ | |
| "Fact", | |
| "RulingByPresentCourt" | |
| ] | |
| } | |
| ``` | |
| There is a one-to-one correspondence between `text` and `labels`. That is: | |
| `len(text) == len(labels)` | |
| and the label at position `i` corresponds to the sentence at position `i`. | |
| `label_vocab.json` contains the permitted rhetorical-role labels. | |
| ## Test Data | |
| The test data contains only the sentences: | |
| ```json | |
| { | |
| "HC_Raghupati_Singhania__vs__Competition_Commission...": [ | |
| "Manmohan, J. 1 .", | |
| "Present writ petition has been filed, challenging the notice dated ...", | |
| "...", | |
| "In the event that such an application is filed, it would be decided ..." | |
| ] | |
| } | |
| ``` | |
| The corresponding labels are private. | |
| ## Expected Submission Format | |
| Predictions must contain one label for every test sentence, in the same order as the input sentences: | |
| ```json | |
| { | |
| "HC_Raghupati_Singhania__vs__Competition_Commission...": [ | |
| "Issue", | |
| "Fact", | |
| "Fact", | |
| "RulingByPresentCourt" | |
| ] | |
| } | |
| ``` | |
| The number of predictions must exactly match the number of sentences in the corresponding test document. Every prediction must be one of the permitted labels in `label_vocab.json`. | |
| ## Evaluation | |
| * **Primary:** Macro-F1 across the 13 rhetorical-role labels | |
| * **Secondary:** Macro-Precision, Macro-Recall | |
| --- | |
| # Phase 4 — Case Judgement Prediction (CJPE) | |
| ## Task | |
| The objective of this phase is to predict the binary judgement outcome for each test case. | |
| ## Dataset Structure | |
| The source data contains separate single-instance and multi-instance training/development splits. These were combined within each corresponding split during preprocessing. | |
| ```text | |
| Phase_4_CJPE/ | |
| ├── Train/ | |
| │ ├── train.json | |
| │ └── dev.json | |
| │ | |
| └── Test/ | |
| └── test.json | |
| ``` | |
| ## Training Data | |
| The training data in `train.json` contains records with: | |
| ```json | |
| { | |
| "id": "...", | |
| "text": "...", | |
| "label": 1 | |
| } | |
| ``` | |
| The training set combines the original single-instance and multi-instance training data. | |
| ## Development Data | |
| The development data in `dev.json` contains records with: | |
| ```json | |
| { | |
| "id": "...", | |
| "text": "...", | |
| "label": 0 | |
| } | |
| ``` | |
| ## Test Data | |
| The test data in `test.json` contains: | |
| ```json | |
| { | |
| "id": "...", | |
| "text": "..." | |
| } | |
| ``` | |
| The output/label is intentionally removed from the test data. | |
| ## Expected Submission Format | |
| Predictions are provided in the following form: | |
| ```json | |
| [ | |
| {"id": "...", "pred": 0}, | |
| {"id": "...", "pred": 1} | |
| ] | |
| ``` | |
| where `pred` is the binary judgement prediction. | |
| ## Evaluation | |
| * **Primary:** Macro-F1 | |
| * **Secondary:** Precision, Recall | |
| --- | |
| # Phase 5 — Legal Statute Identification (LSI) | |
| ## Task | |
| The objective of this phase is to identify the applicable legal statute(s) for each document. | |
| ## Dataset Structure | |
| ```text | |
| Phase_5_LSI/ | |
| ├── Train/ | |
| │ ├── train.json | |
| │ └── dev.json | |
| │ | |
| └── Test/ | |
| └── test.json | |
| ``` | |
| ## Training Data | |
| The training and development data in `train.json` and `dev.json` contain records with: | |
| ```json | |
| { | |
| "id": "...", | |
| "text": "...", | |
| "labels": [1, 7, 23] | |
| } | |
| ``` | |
| `labels` contains the applicable statute IDs for the example. | |
| ## Test Data | |
| The test data in `test.json` contains: | |
| ```json | |
| { | |
| "id": "...", | |
| "text": "..." | |
| } | |
| ``` | |
| The statute labels are removed from the test set. | |
| ## Expected Submission Format | |
| Each prediction is provided in the following form: | |
| ```json | |
| [ | |
| { | |
| "id": "...", | |
| "pred": [1, 7, 23] | |
| } | |
| ] | |
| ``` | |
| `pred` contains the applicable statute IDs. The statute IDs must be valid and unique for a given example. | |
| ## Evaluation | |
| * **Primary:** Macro-F1 | |
| * **Secondary:** Micro-F1, Subset Accuracy | |
| --- | |
| # Phase 6 — Legal Summarization | |
| ## Task | |
| The objective of this phase is to generate a legal summary from the corresponding legal document. | |
| ## Dataset Structure | |
| ```text | |
| Phase_6_Summ/ | |
| ├── Train/ | |
| │ └── train.json | |
| │ | |
| └── Test/ | |
| └── test.json | |
| ``` | |
| ## Training Data | |
| The training data in `train.json` contains records with: | |
| ```json | |
| { | |
| "id": "...", | |
| "document": "...", | |
| "summary": "..." | |
| } | |
| ``` | |
| ## Test Data | |
| The test data in `test.json` contains: | |
| ```json | |
| { | |
| "id": "...", | |
| "document": "..." | |
| } | |
| ``` | |
| ## Expected Submission Format | |
| Predictions are provided in the following form: | |
| ```json | |
| [ | |
| { | |
| "id": "...", | |
| "summary": "Generated legal summary ..." | |
| } | |
| ] | |
| ``` | |
| ## Evaluation | |
| * **Primary:** BERTScore F1 | |
| * **Secondary:** ROUGE-1 F1, ROUGE-L F1 | |
| --- | |
| # Phase 7 — Prior Case Retrieval (PCR) | |
| ## Task | |
| The objective of this phase is to retrieve relevant prior legal cases from a candidate pool for each query case. | |
| This phase is a retrieval task. For each query case, the model must rank candidate case documents by relevance and return the most relevant candidate case IDs. | |
| ## Dataset Structure | |
| Each split contains a query file and a corresponding candidate-pool file. The candidate pools are split-specific and should be used with the corresponding query split. | |
| ```text | |
| Phase_7_PCR/ | |
| ├── Train/ | |
| │ ├── train.json | |
| │ └── train_candidates.json | |
| │ | |
| ├── Dev/ | |
| │ ├── dev.json | |
| │ └── dev_candidates.json | |
| │ | |
| └── Test/ | |
| ├── test.json | |
| └── test_candidates.json | |
| ``` | |
| The dataset contains: | |
| | Split | Queries | Candidates | | |
| | --- | ---: | ---: | | |
| | Train | 827 | 4,320 | | |
| | Dev | 118 | 1,023 | | |
| | Test | 237 | 1,727 | | |
| ## Training Data | |
| The training query file contains query IDs mapped to the query text and its relevant candidate case IDs: | |
| ```json | |
| { | |
| "100120460": { | |
| "text": [ | |
| "CASE NO.: Appeal (civil) 2387 of 2001 ...", | |
| "THOMAS, J.", | |
| "..." | |
| ], | |
| "relevant_candidates": [ | |
| "0000586994", | |
| "0000772259", | |
| "0001182839" | |
| ] | |
| } | |
| } | |
| ``` | |
| The corresponding `train_candidates.json` contains the candidate case documents: | |
| ```json | |
| { | |
| "0000586994": { | |
| "text": [ | |
| "JUDGMENT ...", | |
| "..." | |
| ] | |
| } | |
| } | |
| ``` | |
| The query and candidate IDs are IndianKanoon case IDs. The `text` field contains the case document divided into sentences. | |
| ## Development Data | |
| The development data follows the same structure as the training data: | |
| ```json | |
| { | |
| "100120460": { | |
| "text": [ | |
| "Query case text ..." | |
| ], | |
| "relevant_candidates": [ | |
| "0000586994", | |
| "0000772259" | |
| ] | |
| } | |
| } | |
| ``` | |
| `dev_candidates.json` contains the candidate case documents available for the development queries. | |
| The development relevance labels can be used for local evaluation. | |
| ## Test Data | |
| The test query file contains the query case documents without the relevance labels: | |
| ```json | |
| { | |
| "0000021652": { | |
| "text": [ | |
| "PETITIONER: <NAME> Vs. RESPONDENT: <NAME> & ORS. ...", | |
| "..." | |
| ] | |
| } | |
| } | |
| ``` | |
| The corresponding candidate documents are provided in `test_candidates.json`: | |
| ```json | |
| { | |
| "0000000987": { | |
| "text": [ | |
| "JUDGMENT <NAME>, J. ...", | |
| "..." | |
| ] | |
| } | |
| } | |
| ``` | |
| The `relevant_candidates` field is intentionally removed from the public test queries. The corresponding relevance labels are private. | |
| Only candidates from `test_candidates.json` should be retrieved for the test queries. | |
| ## Expected Submission Format | |
| The prediction file must be named `prediction.json` and contain one ranked list of candidate IDs for every test query: | |
| ```json | |
| { | |
| "0000021652": [ | |
| "0000590455", | |
| "0000916840", | |
| "0001481813", | |
| "0001907199", | |
| "0000000987", | |
| "0000001566", | |
| "0000002886" | |
| ], | |
| "0000030721": [ | |
| "0000004354", | |
| "0000320809", | |
| "0000516439", | |
| "0000611866", | |
| "0000685234", | |
| "0000785119", | |
| "0000849101" | |
| ] | |
| } | |
| ``` | |
| Each query must contain **exactly 7 unique candidate IDs**, ranked from highest to lowest relevance. All submitted candidate IDs must belong to the corresponding test candidate pool. | |
| Only the top 7 retrieved candidates are evaluated. | |
| ## Evaluation | |
| * **Primary:** Micro-F1@7 | |
| * **Secondary:** Micro-Precision@7, Micro-Recall@7 | |
| The gold relevance sets may contain fewer or more than 7 relevant candidates. They are not truncated or padded. The `@7` metric evaluates only the first 7 retrieved candidates against the complete set of relevant candidates for each query. | |
| --- | |
| # Submission Structure | |
| For the competition, submissions are packaged as: | |
| ```text | |
| submission.zip | |
| └── prediction.json | |
| ``` | |
| The `prediction.json` structure differs by phase, as described above. The prediction file must correspond exactly to the IDs and structural requirements of the relevant test set. | |
| ## Phase Summary | |
| | Phase | Task | Input | Output | | |
| |---|---|---|---| | |
| | 1 | Legal Language Model | 512-word legal prompt | 128-word continuation | | |
| | 2 | L-NER | Legal document | Character spans + entity labels | | |
| | 3 | Rhetorical Role | Legal sentences | One rhetorical-role label per sentence | | |
| | 4 | CJPE | Legal case text | Binary judgement prediction | | |
| | 5 | LSI | Legal document | Applicable statute ID(s) | | |
| | 6 | Summarization | Legal document | Legal summary | | |
| | 7 | Prior Case Retrieval | Query case + candidate case pool | Ranked list of 7 candidate case IDs | | |
| ## Citation / Source | |
| The datasets are used as part of the **Legal Language Modelling Challenge — CS-781 Capstone**. | |