Court Judgment Prediction and Recommendation

Mar 1, 2024·
Venkatarami Reddy
Venkatarami Reddy
,
Sahil Bharodia
,
Mukesh Mann
,
Rakesh P. Badoni
· 2 min read
CJPR
Abstract
CJPR built on different Natural Language Processing Models using ILDC dataset from Supreme Court to make Court Judgement Prediction & Providing Recommendations. The motivation for building this system is to provide AI-powered data-driven prediction assistance to judicial practitioners to make a better decision. To meet the demand of solving the humongous load of pending cases, we have resorted to the modern-day techniques of using ML and AI to improve the efficiency of the process. This CJPR system brings a wave of revolution in the legal system where with the help of this model we can provide legal practitioners better insight into the case by giving them relevant historical cases and provide assistance to them for providing a better result.
Stage

⭐ Features

  • Prediction of Court Petitions: CJPR is able to predict the court petitions based on the given case description.
  • Recommendation on Acceptance CJPR is able to recommend (If Petition is Accepted) similar historical cases based on the given case description.
  • Easy to Access: This system is deployed on docker and pushed to docker hub for easy access. Anyone can access this system by just pulling the docker image from docker hub & running it on their local machine.

⚠️ Frameworks and Libraries

  • Hugging Face: Hugging Face is an NLP-focused startup with a large open-source community, in particular around the Transformers library.
  • Sci-kit Learn: Simple and efficient tools for predictive data analysis.
  • Tensorflow / Keras: Deep learning framework used to build and train our models.
  • Pytorch: Deep learning framework used to build and train our models.
  • Numpy: NumPy is a Python library used for working with arrays.
  • Pandas: Pandas is a Python library used for working with data sets.
  • Matplotlib: Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python.
  • Beautiful Soup: Beautiful Soup is a Python library for pulling data out of HTML and XML files.
  • Docker: Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers.

📁 Datasets

The Dataset used for this project is ILDC Large dataset. The dataset contains 54,000+ court cases from the Supreme Court of India. This data is scraped from India Kanoon website. ILDC Large only contains data from Supreme court of India. The dataset contains the following columns:

  • ID: Unique ID for each case
  • Text: Petiton text of the case
  • Decision: Decision of the case (1: Accepted, 0: Rejected)
  • Label: Label of the case (1: Criminal, 0: Civil)
  • Year: Year of the case

💡 Recommendations

The recommendations are provided based on the cosine similarity between the given case description and the historical cases. The cosine similarity is calculated using the

$$ Cosine Similarity(A,B) = \frac{\sum*{i=1} A_i . B_i}{\sqrt{\sum*{i=1} {A*i}^2}\sqrt{\sum*{i=1} {B_i}^2}} $$

Where,

$A_i$ is the $i_{th}$ component of vector $A$ & $B_i$ is the $i_{th}$ component of vector $B$.