GithubHelp home page GithubHelp logo

flaviopinzarrone / legaleval Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pallottaenrico/legaleval

0.0 0.0 0.0 2.34 MB

Solution for LegalEval challenge (SemEval 2023)

Python 2.28% Jupyter Notebook 97.72%

legaleval's Introduction

LegalEval

Authors:

Project work for the "Natural Language Processing" course of the Artificial Intelligence master's degree at University of Bologna. This code in this repository is a devolopment of the first two tasks of the LegalEval challenge of SemEval 2023.

Paper: TeamUnibo at SemEval-2023 Task 6: A transformer based approach to Rhetorical Roles prediction and NER in Legal Texts

The LegalEval challenge proposes three tasks, based on Indian Legal documents:

  • Rhetorical Roles prediction
  • Legal Named Entity Recognition
  • Court Judgement Prediction with Explanation.

Introduction

Our work focuses on the first two tasks. For the first task we present a context-aware approach to enhance sentence information. With the help of this approach, the classification model utilizing InLegalBert as a transformer achieved 81.12% Micro-F1. For the second task we present a NER approach to extract and classify entities like names of petitioner, respondent, court or statute from a given document. The model utilizing XLNet as transformer and a dependency parser on top achieved 87.43% Macro-F1.

Task A

Open In Colab

The objective of the task is to segment a given legal document by predicting the rhetorical role label for each sentence such as a preamble, fact, ratio, arguments, etc. These are referred to as Rhetorical Roles (RR). This segmentation is a fundamental building block for many legal AI applications like judgment summarizing, judgment outcome prediction, precedent search, etc.

Best model architecture

Context aware InLegalBERT

Output Example

Example of a segmented document

Results

Validation Set Test Set
Models Weighted Precision Weighted Recall Micro F1 Weighted Precision Weighted Recall Micro F1
Context Aware Legal-RoBERTa 77.0 76.0 76.0 79.0 80.0 80.0
Context Aware InLegalBERT 77.0 77.0 78.0 81.0 82.0 82.0

Task B

Open In Colab

The objective of the task is to extract legal named entities from court judgment texts to effectively generate metadata information that can be exploited for many legal applications like knowledge graph creation, co-reference resolution and in general to build any query-able knowledge base that would allow faster information access.

Best model architecture

Transformer + BiLSTM + CRF

Output Example

Example of Legal Named Entities detected in a sentence

Results

Validation Set Test Set
Models Macro Precision Macro Recall Macro F1 Macro Precision Macro Recall Macro F1
RoBERTa - BiLSTM - CRF 76.0 82.3 79.0 85.5 88.4 87.0
XLNet - BiLSTM - CRF 85.3 86.8 84.0 85.9 90.4 88.1

References

legaleval's People

Contributors

pallottaenrico avatar giuseppe-tanzi avatar yurinoviello avatar flaviopinzarrone avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.