IPC_matcher / README.md
ri2000's picture
Update README.md
1287c41 verified
metadata
license: mit
tags:
  - legal
  - ipc
  - classification
  - bert
  - indian-law
  - multilingual
model-index:
  - name: IPC Matcher  LawSight
    results: []
library_name: transformers
datasets:
  - custom
language:
  - en
  - hi
  - mr
pipeline_tag: text-classification

🧠 LawSight – IPC Section Matcher (BERT-based)

This model is part of LawSight – an AI-powered legal assistance tool designed to suggest applicable Indian Penal Code (IPC) sections based on user complaints.

It uses BERT embeddings and a fine-tuned classification head to intelligently match free-form complaint descriptions with relevant IPC sections.


📌 Use Cases

  • 👮 Law enforcement automation
  • ⚖️ Legal aid applications
  • 📚 Legal NLP research
  • 🧾 FIR assistance & section classification

🚀 Model Details

  • Architecture: BERT (base model) with a custom classification head
  • Input: Complaint text in English
  • Output: One or more IPC section numbers with confidence scores
  • Fine-Tuned On: Custom dataset of IPC-tagged complaints
  • Multilingual Support: Input preprocessed using translation for multilingual capabilities

🔧 How to Use

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

# Load model
model_name = "ri2000/IPC_matcher"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)

# Sample input
complaint = "A man forcefully entered my house and tried to harm me."

# Tokenize
inputs = tokenizer(complaint, return_tensors="pt", truncation=True, padding=True)

# Predict
outputs = model(**inputs)
logits = outputs.logits
predicted = torch.argmax(logits, dim=1)

# Show result
print(f"Predicted IPC Section ID: {predicted.item()}")

📦 Access to Dataset & Model Weights

Access to the full dataset and model training pipeline is available upon request:

👉 Request Access via Google Form


👩‍💻 Developed By

Riya,Sachi & Tanmay
With support from the LawSight Team

Built with ❤️ for societal impact.