Smart Legal Assistance Chatbot for the Pakistan Penal Code

Read full text
Authors: Usman Aslam
Cited by: 0

Abstract

This project introduces an innovative legal chatbotbased on AI that serves users within the consultations concerningthe Pakistan Penal Code (PPC), and it exploits the advancedautomatic learning methods (ML) and natural language understanding (NLP), i.e., cosine similarity, latent semantic analysis(LSA) and dialogue. These tickets are interpreted by the systemto provide a stable legal guide, which is taken out of a thoroughlycleaned, formatted data set derived by extracting the contentsof ”PPC.pdf” by use of gift and analysis. In the investigation,the problem of the changing role of NLP and AI in the areaof criminal justice and civil administration under considerationis brought to the fore, which includes punishment predictionmodels based on crime and intelligent assistance systems in thefield of law that enhance decision making, fairness, production,and efficiency across the range. Chatbot cosine similarity incombination with TF-IDF is made to overlap a pertinent part ofPPC to retrieve facts, whereas LSA is made to raise the levelof semantic interpretation and di-alogpt, useful to engage inaesthetically appealing dialogue on general legal topics. TheseNLP modules are incorporated into a structured legal databasevia a bottle backend, but also with the possibility of a simplefront on modern web technologies in order to interact with it.The PPC data set has clear headings of section and titles numbersoutlining crimes, sanctions and sub sections/ clauses to have anuance of ideas in conditions and aspects

Fields of Study & Subjects

Artificial Intelligence in Law AI in Service Interactions Artificial Intelligence Applications

Publication details

Journal / source
Zenodo (CERN European Organization for Nuclear Research)
Publication date
26 February 2026
Language
EN
Document type
Preprint