Downloads · 30 days
0
0% of all-time downloads
opennyaiorg/en_legal_ner_sm
en_legal_ner_sm is a machine learning model from opennyaiorg. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
Downloads · 30 days
0
0% of all-time downloads
All-time downloads
705
Public
Repo size
19.6 MB
Likes
0
Public
Click a slice to open those files.
Other6.8 MB · 47%
From the Hugging Face model README
Indian Legal Named Entity Recognition(NER): Identifying relevant named entities in an Indian legal judgement using legal NER trained on spacy.
| Type | Score |
|---|---|
| F1-Score | 74.87 |
Precision | 72.98 |
Recall | 76.85 |
| Feature | Description |
|---|---|
| Name | en_legal_ner_sm |
| Version | 3.2.0 |
| spaCy | >=3.2.2,<3.3.0 |
| Default Pipeline | token2vec, ner |
| Components | token2vec, ner |
| Vectors | 0 keys, 0 unique vectors (0 dimensions) |
| Sources | InLegalNER Train Data GitHub |
| License | MIT |
| Author | Aman Tiwari |
Install the model using pip
pip install https://huggingface.co/opennyaiorg/en_legal_ner_sm/resolve/main/en_legal_ner_sm-any-py3-none-any.whl
Using pretrained NER model
# Using spacy.load().
import spacy
nlp = spacy.load("en_legal_ner_sm")
text = "Section 319 Cr.P.C. contemplates a situation where the evidence adduced by the prosecution for Respondent No.3-G. Sambiah on 20th June 1984"
doc = nlp(text)
# Print indentified entites
for ent in doc.ents:
print(ent,ent.label_)
##OUTPUT
#Section 319 PROVISION
#Cr.P.C. STATUTE
#G. Sambiah RESPONDENT
#20th June 1984 DATE
| ENTITY | BELONGS TO |
|---|---|
LAWYER | PREAMBLE |
COURT | PREAMBLE, JUDGEMENT |
JUDGE | PREAMBLE, JUDGEMENT |
PETITIONER | PREAMBLE, JUDGEMENT |
RESPONDENT | PREAMBLE, JUDGEMENT |
CASE_NUMBER | JUDGEMENT |
GPE | JUDGEMENT |
DATE | JUDGEMENT |
ORG | JUDGEMENT |
STATUTE | JUDGEMENT |
WITNESS | JUDGEMENT |
PRECEDENT | JUDGEMENT |
PROVISION | JUDGEMENT |
OTHER_PERSON | JUDGEMENT |
@inproceedings{kalamkar-etal-2022-named,
title = "Named Entity Recognition in {I}ndian court judgments",
author = "Kalamkar, Prathamesh and
Agarwal, Astha and
Tiwari, Aman and
Gupta, Smita and
Karn, Saurabh and
Raghavan, Vivek",
booktitle = "Proceedings of the Natural Legal Language Processing Workshop 2022",
month = dec,
year = "2022",
address = "Abu Dhabi, United Arab Emirates (Hybrid)",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2022.nllp-1.15",
doi = "10.18653/v1/2022.nllp-1.15",
pages = "184--193",
abstract = "Identification of named entities from legal texts is an essential building block for developing other legal Artificial Intelligence applications. Named Entities in legal texts are slightly different and more fine-grained than commonly used named entities like Person, Organization, Location etc. In this paper, we introduce a new corpus of 46545 annotated legal named entities mapped to 14 legal entity types. The Baseline model for extracting legal named entities from judgment text is also developed.",
}