LegalEval - Legal Document Analysis
Understanding legal texts through the SemEval-2023 Task 6 (LegalEval) protocol: rhetorical role labeling of sentences, legal named entity recognition (L-NER) for entities such as courts, petitioners, respondents, judges, statutes, and precedents, and court judgment prediction with explanation. Based on SemEval-2023 Task 6 (Modi et al.).
Configuration Fileconfig.yaml
This Potato config reproduces the annotation task. Save it as config.yaml and run potato start config.yaml to try it.
# LegalEval - Understanding Legal Texts
# Based on Modi et al., SemEval-2023 Task 6
# Paper: https://aclanthology.org/2023.semeval-1.318/
# Dataset: https://sites.google.com/view/legaleval/home
#
# SemEval-2023 Task 6 (LegalEval) has three sub-tasks:
# Task A - Rhetorical Roles Labeling: assign a rhetorical role to each
# sentence of a legal judgment (e.g., PREAMBLE, FAC, ISSUE, RATIO).
# Task B - Legal Named Entity Recognition (L-NER): identify legal entities
# such as courts, petitioners, respondents, judges, statutes, etc.
# Task C - Court Judgment Prediction with Explanation (CJPE): predict the
# binary case outcome and supply supporting explanation sentences.
#
# This showcase config demonstrates Task A (rhetorical role, radio) and
# Task B (L-NER, span) on sentence-level legal passages.
annotation_task_name: "LegalEval - Legal Document Analysis"
task_dir: "."
data_files:
- sample-data.json
item_properties:
id_key: "id"
text_key: "text"
output_annotation_dir: "annotation_output/"
output_annotation_format: "json"
port: 8000
server_name: localhost
annotation_schemes:
- annotation_type: radio
name: rhetorical_role
description: "Task A - Assign the rhetorical role of this sentence in the legal judgment"
labels:
- "PREAMBLE"
- "FAC"
- "RLC"
- "ISSUE"
- "ARG_PETITIONER"
- "ARG_RESPONDENT"
- "ANALYSIS"
- "STA"
- "PRE_RELIED"
- "PRE_NOT_RELIED"
- "RATIO"
- "RPC"
- "NONE"
tooltips:
"PREAMBLE": "Metadata / header of the judgment (court, parties, judges)"
"FAC": "Facts - events or circumstances that led to the case"
"RLC": "Ruling by Lower Court"
"ISSUE": "Legal issues framed by the court"
"ARG_PETITIONER": "Arguments advanced by the petitioner/appellant"
"ARG_RESPONDENT": "Arguments advanced by the respondent"
"ANALYSIS": "Court's analysis / reasoning and application of law to facts"
"STA": "Statute - relevant statutory provisions cited"
"PRE_RELIED": "Precedent relied upon by the court"
"PRE_NOT_RELIED": "Precedent cited but not relied upon"
"RATIO": "Ratio of the decision - the reason for the final decision"
"RPC": "Ruling by Present Court - final decision / order"
"NONE": "No rhetorical role applies"
- annotation_type: span
name: legal_entities
description: "Task B (L-NER) - Highlight and label all legal named entities in the text"
labels:
- "COURT"
- "PETITIONER"
- "RESPONDENT"
- "JUDGE"
- "LAWYER"
- "DATE"
- "ORG"
- "GPE"
- "STATUTE"
- "PROVISION"
- "PRECEDENT"
- "CASE_NUMBER"
- "WITNESS"
- "OTHER_PERSON"
annotation_instructions: |
You will see a sentence from an Indian court judgment.
1. Task A (Rhetorical Role): assign the single rhetorical role that best
describes the function of this sentence in the judgment (e.g., PREAMBLE,
FAC, ISSUE, ANALYSIS, RATIO, RPC).
2. Task B (L-NER): highlight every legal named entity in the sentence and
assign the appropriate label. Entity types include COURT, PETITIONER,
RESPONDENT, JUDGE, LAWYER, DATE, ORG, GPE, STATUTE, PROVISION, PRECEDENT,
CASE_NUMBER, WITNESS, and OTHER_PERSON.
html_layout: |
<div style="padding: 15px; max-width: 800px; margin: auto;">
<div style="background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 8px; padding: 12px; margin-bottom: 12px;">
<strong style="color: #065f46;">Case Type:</strong>
<span style="font-size: 15px; margin-left: 8px;">{{case_type}}</span>
</div>
<div style="background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 8px; padding: 16px; margin-bottom: 16px;">
<strong style="color: #0369a1;">Legal Text:</strong>
<p style="font-size: 16px; line-height: 1.7; margin: 8px 0 0 0;">{{text}}</p>
</div>
</div>
allow_all_users: true
instances_per_annotator: 50
annotation_per_instance: 2
allow_skip: true
skip_reason_required: false
Sample Datasample-data.json
[
{
"id": "legal_001",
"text": "The Supreme Court of India in Vishaka v. State of Rajasthan (1997) laid down guidelines for the prevention of sexual harassment at the workplace. Justice J.S. Verma, delivering the judgment on 13 August 1997, invoked Article 14, Article 19, and Article 21 of the Constitution of India.",
"case_type": "Constitutional Law"
},
{
"id": "legal_002",
"text": "The petitioner, Ramesh Kumar Singh, filed a writ petition under Article 226 before the High Court of Delhi challenging the order dated 15 March 2022 passed by the respondent, Municipal Corporation of Delhi, terminating his employment without due process.",
"case_type": "Service Law"
}
]
// ... and 8 more itemsGet This Design
Clone or download from the repository
Quick start:
git clone https://github.com/davidjurgens/potato-showcase.git cd potato-showcase/semeval/2023/task06-legaleval potato start config.yaml
Dataset & paper
Modi et al., SemEval 2023
Citation (BibTeX)
@inproceedings{modi-etal-2023-semeval,
title = "{S}em{E}val-2023 Task 6: {L}egal{E}val - Understanding Legal Texts",
author = "Modi, Ashutosh and Kalamkar, Prathamesh and Karn, Saurabh and Tiwari, Aman and Joshi, Abhinav and Tanikella, Sai Kiran and Guha, Shouvik Kumar and Malhan, Sachin and Raghavan, Vivek",
booktitle = "Proceedings of the 17th International Workshop on Semantic Evaluation (SemEval-2023)",
month = jul,
year = "2023",
address = "Toronto, Canada",
publisher = "Association for Computational Linguistics",
pages = "2362--2374",
doi = "10.18653/v1/2023.semeval-1.318",
url = "https://aclanthology.org/2023.semeval-1.318"
}Details
Annotation Types
Domain
Use Cases
Tags
Found an issue or want to improve this design?
Open an IssueRelated Designs
Aspect-Based Sentiment Analysis
Identification of aspect terms in review text with sentiment polarity classification for each aspect. Based on SemEval-2016 Task 5 (ABSA).
Character Identification on Multiparty Dialogues
Identification and linking of character mentions in TV show dialogue, combining span annotation with entity resolution for the main cast of Friends. Based on SemEval-2018 Task 4.
Clickbait Spoiling
Classification and extraction of spoilers for clickbait posts, including spoiler type identification and span-level spoiler detection. Based on SemEval-2023 Task 5 (Fröbe et al.).