size_categories:1K<n<10K format:parquet modality:text library:datasets library:pandas library:mlcroissant library:polars region:us
---
dataset_info:
  features:
  - name: Judgement-Summary Pairs
    dtype: string
  splits:
  - name: train
    num_bytes: 210389804
    num_examples: 7030
  - name: test
    num_bytes: 3265635
    num_examples: 100
  download_size: 98328073
  dataset_size: 213655439
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: test
    path: data/test-*
---

# Reformatted Legal Text Summarization Dataset

## Overview

This dataset is a restructured version of a Legal Text Summarization dataset, specifically filtered to include only entries from the `IN-Abs` dataset. The dataset consists of pairs of legal judgements and their corresponding summaries. Each judgement-summary pair is formatted into an **Instruction-Prompt style format** suitable for training language models for tasks like Summarization and Legal Text Analysis.

## Dataset Structure

- **Column Name:** `Judgement-Summary Pairs`
- **Format:** The dataset contains one column named "Judgement-Summary Pairs", which holds the formatted instruction-prompt pairs. Each entry is a structured pair of a legal judgement and its corresponding summary.

### Example of an Entry:

```plaintext
<s>[INST] Summarize the following judgement: [Judgement Text] [/INST] [Summary Text] </s>
```
Where:
[Judgement Text] is the original legal judgement text.
[Summary Text] is the summary of the judgement.

### Sample Entry:

```plaintext
<s>[INST] Summarize the following judgement: The court finds that the defendant was not responsible for the damages caused as there was insufficient evidence to support the claims made by the plaintiff. [/INST] The court ruled in favor of the defendant due to lack of evidence. </s>
```

## Data Preparation Process:
The dataset was prepared using the following steps:
- Filtering: The dataset was filtered to include only entries from the IN-Abs dataset.
- Transformation: Each judgement and its corresponding summary were formatted into instruction-prompt pairs using the following template:
  - ```plaintext
    <s>[INST] Summarize the following judgement: {judgement_text} [/INST] {summary_text} </s>
    ```
- Column Removal: All columns except the newly created "Judgement-Summary Pairs" were removed to streamline the dataset for usage.

## Usage
The reformatted dataset is suitable for training language models on legal text summarization tasks. Here’s how you can use it:

- **Load the Dataset**: Use a data loading library like datasets or pandas to read the dataset.
- **Training a Model**: You can train a model using the instruction-prompt pairs provided in the dataset. Each pair serves as an input-output example for supervised learning, particularly in the fields of natural language processing (NLP) and legal AI.
- **Fine-tuning Existing Models**: Fine-tune pre-trained models such as GPT, BERT, or LLaMA on this dataset to adapt them for legal text summarization tasks.

### License
The dataset is made available for educational and research purposes. Please ensure that you have the appropriate permissions and rights to use the original data before utilizing this reformatted version.

### Acknowledgements
The dataset preparation and transformation were inspired by the need to improve legal text summarization and the creation of structured datasets for NLP tasks.
Special thanks to the original data providers and contributors to legal text summarization research

### Contact
For questions or further information, please contact **Ajay Mukund S** at *ajaymukund1998@gmail.com*.