InLegalBERT fine-tuned for Legal Named Entity Recognition
Extracts 14 legal entity types (COURT, JUDGE, LAWYER, PETITIONER, RESPONDENT,
CASE_NUMBER, STATUTE, PROVISION, PRECEDENT, WITNESS, OTHER_PERSON, ORG, GPE, DATE)
from legal/court documents. Base model: law-ai/InLegalBERT (pretrained on 5.4M
Indian legal documents). Fine-tuned on opennyaiorg/InLegalNER.
Performance (test set)
| Metric | Score |
|---|---|
| Precision | 0.8308 |
| Recall | 0.8763 |
| F1 | 0.8530 |
Usage
from transformers import pipeline
ner = pipeline("token-classification", model="samandar1105/inlegalbert-legal-ner", aggregation_strategy="simple")
ner("Justice Sharma of the Bombay High Court delivered judgment on 14 March 2019.")
This model is part of a Legal NER + RAG document-intelligence pipeline (NER extraction + retrieval-augmented Q&A). See the companion Space for the full app.