In this paper, we address the task of semantic segmentation of legal documents through rhetorical role classification, with a focus on Indian legal judgments. We introduce LegalSeg, the largest annotated dataset for this task, comprising over 7,000 documents and 1.4 million sentences, labeled with 7 rhetorical roles. To benchmark performance, we evaluate multiple state-of-the-art models, including Hierarchical BiLSTM-CRF, TransformerOverInLegalBERT (ToInLegalBERT), Graph Neural Networks (GNNs), and Role-Aware Transformers, alongside an exploratory RhetoricLLaMA, an instruction-tuned large language model. Our results demonstrate that models incorporating broader context, structural relationships, and sequential sentence information outperform those relying solely on sentence-level features. Additionally, we conducted experiments using surrounding context and predicted or actual labels of neighboring sentences to assess their impact on classification accuracy. Despite these advancements, challenges persist in distinguishing between closely related roles and addressing class imbalance. Our work underscores the potential of advanced techniques for improving legal document understanding and sets a strong foundation for future research in legal NLP.
[π Website] β’
[π Proceedings] β’
[π ArXiv] β’
[π€ HF Models] β’
[π€ HF Datasets] β’
[
GitHub] β’
This is the official implementation of the paper:
LegalSeg: Unlocking the Structure of Indian Legal Judgments Through Rhetorical Role Classification , to appear in NAACL 2025
Authors: Shubham Kumar Nigam, Tanmay Dubey , Govind Sharma, Noel Shallum, Kripabandhu Ghosh, and Arnab Bhattacharya:
If you have any questions on this work, please open a GitHub issue or email the authors at
shubhamkumarnigam@gmail.com tanmay.dubey2222@gmail.com govindsharma0406@gmail.com
The pie chart below shows the distribution of Rhetorical Roles within the Dataset and the table shows the Example sentences for each label.
![]() | ![]() |
The table below is showing various statistics regarding the documents and sentences within the dataset, including the average number of sentences per document, average number of token counts per sentence and average number of Tokens per each Label etc for Train Test and Validation dataset presented in Table 2.
Below are the Performance Comparison of Models on Rhetorical Role Classification. In the Model column, i indicates the current sentence, i β 1 means the previous sentence, and i + 1 means the next sentence. label_t
and label_p refer to the true and predicted labels of the previous sentences. The best results are in bold.

If you use this project in your research or other work, please cite it as follows:
@inproceedings{nigam2025legalseg,
title={Legalseg: Unlocking the structure of indian legal judgments through rhetorical role classification},
author={Nigam, Shubham Kumar and Dubey, Tanmay and Sharma, Govind and Shallum, Noel and Ghosh, Kripabandhu and Bhattacharya, Arnab},
booktitle={Findings of the Association for Computational Linguistics: NAACL 2025},
pages={1129--1144},
year={2025}
}
or
@inproceedings{nigam-etal-2025-legalseg,
title = "{L}egal{S}eg: Unlocking the Structure of {I}ndian Legal Judgments Through Rhetorical Role Classification",
author = "Nigam, Shubham Kumar and
Dubey, Tanmay and
Sharma, Govind and
Shallum, Noel and
Ghosh, Kripabandhu and
Bhattacharya, Arnab",
editor = "Chiruzzo, Luis and
Ritter, Alan and
Wang, Lu",
booktitle = "Findings of the Association for Computational Linguistics: NAACL 2025",
month = apr,
year = "2025",
address = "Albuquerque, New Mexico",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2025.findings-naacl.63/",
doi = "10.18653/v1/2025.findings-naacl.63",
pages = "1129--1144",
ISBN = "979-8-89176-195-7",
abstract = "In this paper, we address the task of semantic segmentation of legal documents through rhetorical role classification, with a focus on Indian legal judgments. We introduce **LegalSeg**, the largest annotated dataset for this task, comprising over 7,000 documents and 1.4 million sentences, labeled with 7 rhetorical roles. To benchmark performance, we evaluate multiple state-of-the-art models, including Hierarchical BiLSTM-CRF, TransformerOverInLegalBERT (ToInLegalBERT), Graph Neural Networks (GNNs), and Role-Aware Transformers, alongside an exploratory **RhetoricLLaMA**, an instruction-tuned large language model. Our results demonstrate that models incorporating broader context, structural relationships, and sequential sentence information outperform those relying solely on sentence-level features. Additionally, we conducted experiments using surrounding context and predicted or actual labels of neighboring sentences to assess their impact on classification accuracy. Despite these advancements, challenges persist in distinguishing between closely related roles and addressing class imbalance. Our work underscores the potential of advanced techniques for improving legal document understanding and sets a strong foundation for future research in legal NLP."
}
Python
100.0%
In this paper, we address the task of semantic segmentation of legal documents through rhetorical role classification, with a focus on Indian legal judgments. We introduce LegalSeg, the largest annotated dataset for this task, comprising over 7,000 documents and 1.4 million sentences, labeled with 7 rhetorical roles. To benchmark performance, we evaluate multiple state-of-the-art models, including Hierarchical BiLSTM-CRF, TransformerOverInLegalBERT (ToInLegalBERT), Graph Neural Networks (GNNs), and Role-Aware Transformers, alongside an exploratory RhetoricLLaMA, an instruction-tuned large language model. Our results demonstrate that models incorporating broader context, structural relationships, and sequential sentence information outperform those relying solely on sentence-level features. Additionally, we conducted experiments using surrounding context and predicted or actual labels of neighboring sentences to assess their impact on classification accuracy. Despite these advancements, challenges persist in distinguishing between closely related roles and addressing class imbalance. Our work underscores the potential of advanced techniques for improving legal document understanding and sets a strong foundation for future research in legal NLP.
[π Website] β’
[π Proceedings] β’
[π ArXiv] β’
[π€ HF Models] β’
[π€ HF Datasets] β’
[
GitHub] β’
This is the official implementation of the paper:
LegalSeg: Unlocking the Structure of Indian Legal Judgments Through Rhetorical Role Classification , to appear in NAACL 2025
Authors: Shubham Kumar Nigam, Tanmay Dubey , Govind Sharma, Noel Shallum, Kripabandhu Ghosh, and Arnab Bhattacharya:
If you have any questions on this work, please open a GitHub issue or email the authors at
shubhamkumarnigam@gmail.com tanmay.dubey2222@gmail.com govindsharma0406@gmail.com
The pie chart below shows the distribution of Rhetorical Roles within the Dataset and the table shows the Example sentences for each label.
![]() | ![]() |
The table below is showing various statistics regarding the documents and sentences within the dataset, including the average number of sentences per document, average number of token counts per sentence and average number of Tokens per each Label etc for Train Test and Validation dataset presented in Table 2.
Below are the Performance Comparison of Models on Rhetorical Role Classification. In the Model column, i indicates the current sentence, i β 1 means the previous sentence, and i + 1 means the next sentence. label_t
and label_p refer to the true and predicted labels of the previous sentences. The best results are in bold.

If you use this project in your research or other work, please cite it as follows:
@inproceedings{nigam2025legalseg,
title={Legalseg: Unlocking the structure of indian legal judgments through rhetorical role classification},
author={Nigam, Shubham Kumar and Dubey, Tanmay and Sharma, Govind and Shallum, Noel and Ghosh, Kripabandhu and Bhattacharya, Arnab},
booktitle={Findings of the Association for Computational Linguistics: NAACL 2025},
pages={1129--1144},
year={2025}
}
or
@inproceedings{nigam-etal-2025-legalseg,
title = "{L}egal{S}eg: Unlocking the Structure of {I}ndian Legal Judgments Through Rhetorical Role Classification",
author = "Nigam, Shubham Kumar and
Dubey, Tanmay and
Sharma, Govind and
Shallum, Noel and
Ghosh, Kripabandhu and
Bhattacharya, Arnab",
editor = "Chiruzzo, Luis and
Ritter, Alan and
Wang, Lu",
booktitle = "Findings of the Association for Computational Linguistics: NAACL 2025",
month = apr,
year = "2025",
address = "Albuquerque, New Mexico",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2025.findings-naacl.63/",
doi = "10.18653/v1/2025.findings-naacl.63",
pages = "1129--1144",
ISBN = "979-8-89176-195-7",
abstract = "In this paper, we address the task of semantic segmentation of legal documents through rhetorical role classification, with a focus on Indian legal judgments. We introduce **LegalSeg**, the largest annotated dataset for this task, comprising over 7,000 documents and 1.4 million sentences, labeled with 7 rhetorical roles. To benchmark performance, we evaluate multiple state-of-the-art models, including Hierarchical BiLSTM-CRF, TransformerOverInLegalBERT (ToInLegalBERT), Graph Neural Networks (GNNs), and Role-Aware Transformers, alongside an exploratory **RhetoricLLaMA**, an instruction-tuned large language model. Our results demonstrate that models incorporating broader context, structural relationships, and sequential sentence information outperform those relying solely on sentence-level features. Additionally, we conducted experiments using surrounding context and predicted or actual labels of neighboring sentences to assess their impact on classification accuracy. Despite these advancements, challenges persist in distinguishing between closely related roles and addressing class imbalance. Our work underscores the potential of advanced techniques for improving legal document understanding and sets a strong foundation for future research in legal NLP."
}
Python
100.0%