Views
No views yet
Silver-only baseline. Annotations are automatically generated (regex + transformer NER + gazetteer enrichment), not human-verified. Gold-annotated v1.0 is in progress.
1from transformers import pipeline
2
3ner = pipeline(
4 "token-classification",
5 model="evolawyer/inlegalbert-sc-ner-silver",
6 aggregation_strategy="simple",
7)
8
9text = (
10 "The appellant M/S Emaar MGF Land Ltd. challenged the order under s.21 "
11 "of the Consumer Protection Act, 1986, relying on (2017) 15 SCC 720."
12)
13
14for e in ner(text):
15 print(e["entity_group"], "|", e["word"], "|", round(e["score"], 3))STATUTE · PROVISION · CASE_CITATION · JUDGE · PETITIONER · RESPONDENT · LAWYER · COURT · ORG · GPE · DATE · OTHER_PERSON · WITNESSO + B-/I- × 13).| Property | Value |
|---|---|
| Base model | law-ai/InLegalBERT (BERT-base, 110M parameters) |
| Head | Linear softmax (AutoModelForTokenClassification) |
| Training data | ~34,700 silver-annotated chunks from 33k judgments |
| Epochs | 3 |
| Max length | 512 tokens |
| Stride (train) | 128 (overlapping chunks) |
| Stride (val) | 512 (non-overlapping) |
| Batch size | 8 (fp16 + gradient checkpointing) |
| Learning rate | 2e-5 |
| Hardware | Kaggle T4 |
| Entity | Precision | Recall | F1 | Support |
|---|---|---|---|---|
| CASE_CITATION | 96.72% | 98.82% | 97.76% | 3,821 |
| PROVISION | 96.09% | 96.60% | 96.35% | 20,248 |
| STATUTE | 90.08% | 93.88% | 91.94% | 8,187 |
| LAWYER | 73.60% | 75.77% | 74.67% | 3,982 |
| JUDGE | 66.80% | 69.36% | 68.06% | 1,978 |
| DATE | 51.98% | 58.74% | 55.15% | 3,289 |
| RESPONDENT | 51.28% | 49.62% | 50.44% | 1,731 |
| COURT | 46.91% | 54.31% | 50.34% | 1,033 |
| WITNESS | 44.93% | 55.77% | 49.77% | 762 |
| OTHER_PERSON | 43.20% | 51.78% | 47.11% | 4,266 |
| PETITIONER | 55.07% | 37.64% | 44.71% | 1,573 |
| ORG | 42.36% | 40.37% | 41.34% | 2,128 |
| GPE | 38.07% | 35.17% | 36.56% ⚠ | 1,197 |
| micro avg | 77.54% | 79.84% | 78.67% | 54,195 |
| macro avg | 61.31% | 62.91% | 61.86% | — |
| weighted avg | 78.00% | 79.84% | 78.80% | — |
JUDGE, PETITIONER, RESPONDENTCASE_CITATION, STATUTE, PROVISIONen_legal_ner_trf (InLegalBERT-based), offset-corrected; produces LAWYER, COURT, ORG, GPE, DATE, OTHER_PERSON, WITNESSSTATUTE spansevolawyer/indian-sc-judgments-ner-silver. The 25 locked test files are excluded.law-ai/InLegalBERT is MIT licensed (compatible with Apache 2.0).