Skip to content
Showcase/LegalEval - Legal Document Analysis
advancedtext

LegalEval - Legal Document Analysis

Relevance classification and named entity recognition for legal documents, identifying key entities such as courts, petitioners, respondents, judges, dates, statutes, and precedents. Based on SemEval-2023 Task 6 (Modi et al.).

PERORGLOCPERORGLOCDATESelect text to annotate

Archivo de configuraciónconfig.yaml

# LegalEval - Legal Document Analysis
# Based on Modi et al., SemEval 2023
# Paper: https://aclanthology.org/2023.semeval-1.310/
# Dataset: https://sites.google.com/view/legaleval/home
#
# This task asks annotators to assess the relevance of legal document passages
# and identify key legal entities within the text. Entity categories include
# courts, petitioners, respondents, judges, dates, statutes, and precedents.
#
# Relevance Labels:
# - Relevant: The passage contains substantive legal content
# - Not Relevant: The passage is procedural boilerplate or irrelevant
#
# Entity Categories:
# - Court, Petitioner, Respondent, Judge, Date, Statute, Precedent

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: relevance
    description: "Is this passage substantively relevant to the legal case?"
    labels:
      - "Relevant"
      - "Not Relevant"
    keyboard_shortcuts:
      "Relevant": "1"
      "Not Relevant": "2"
    tooltips:
      "Relevant": "The passage contains substantive legal arguments, facts, or reasoning"
      "Not Relevant": "The passage is procedural boilerplate or not relevant to the case outcome"

  - annotation_type: span
    name: legal_entities
    description: "Highlight and label all legal entities in the text"
    labels:
      - "Court"
      - "Petitioner"
      - "Respondent"
      - "Judge"
      - "Date"
      - "Statute"
      - "Precedent"

annotation_instructions: |
  You will see a passage from a legal document.
  1. First, determine whether the passage is substantively relevant to the legal case.
  2. Then, highlight all legal entities in the text and assign the appropriate label.
  3. Entity types include: Court names, Petitioners, Respondents, Judge names,
     Dates, Statute references, and Precedent case citations.

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

Datos de ejemplosample-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 items

Obtener este diseño

View on GitHub

Clone or download from the repository

Inicio rápido:

git clone https://github.com/davidjurgens/potato-showcase.git
cd potato-showcase/semeval/2023/task06-legaleval
potato start config.yaml

Detalles

Tipos de anotación

radiospan

Dominio

NLPLegalSemEval

Casos de uso

Legal NERDocument ClassificationLegal Text Analysis

Etiquetas

semevalsemeval-2023shared-tasklegalnerdocument-classification

¿Encontró un problema o desea mejorar este diseño?

Abrir un issue