Update README.md
Browse files
README.md
CHANGED
@@ -2,12 +2,33 @@
|
|
2 |
tags:
|
3 |
- spacy
|
4 |
- token-classification
|
|
|
|
|
|
|
5 |
language:
|
6 |
- en
|
7 |
license: mit
|
8 |
model-index:
|
9 |
- name: en_legal_ner_sm
|
10 |
-
results:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
---
|
12 |
Indian Legal Named Entity Recognition: Identifying relevant entities in an Indian legal document
|
13 |
|
@@ -16,12 +37,41 @@ Indian Legal Named Entity Recognition: Identifying relevant entities in an India
|
|
16 |
| **Name** | `en_legal_ner_sm` |
|
17 |
| **Version** | `3.2.0` |
|
18 |
| **spaCy** | `>=3.2.2,<3.3.0` |
|
19 |
-
| **Default Pipeline** | `
|
20 |
-
| **Components** | `
|
21 |
| **Vectors** | 0 keys, 0 unique vectors (0 dimensions) |
|
22 |
-
| **Sources** |
|
23 |
| **License** | `MIT` |
|
24 |
-
| **Author** | [Aman Tiwari](https://
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
### Label Scheme
|
27 |
|
@@ -29,9 +79,22 @@ Indian Legal Named Entity Recognition: Identifying relevant entities in an India
|
|
29 |
|
30 |
<summary>View label scheme (14 labels for 1 components)</summary>
|
31 |
|
32 |
-
|
|
33 |
| --- | --- |
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
</details>
|
37 |
|
@@ -39,3 +102,13 @@ Indian Legal Named Entity Recognition: Identifying relevant entities in an India
|
|
39 |
|
40 |
| Type | Score |
|
41 |
| --- | --- |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
tags:
|
3 |
- spacy
|
4 |
- token-classification
|
5 |
+
widget:
|
6 |
+
- 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"
|
7 |
+
- text: "In The High Court Of Kerala At Ernakulam\n\nCrl Mc No. 1622 of 2006()\n\n\n1. T.R.Ajayan, S/O. O.Raman,\n ... Petitioner\n\n Vs\n\n\n\n1. M.Ravindran,\n ... Respondent\n\n2. Mrs. Nirmala Dinesh, W/O. Dinesh,\n\n For Petitioner :Sri.A.Kumar\n\n For Respondent :Smt.M.K.Pushpalatha\n\nThe Hon'ble Mr. Justice P.R.Raman\nThe Hon'ble Mr. Justice V.K.Mohanan\n\n Dated :07/01/2008\n\n O R D E R\n"
|
8 |
language:
|
9 |
- en
|
10 |
license: mit
|
11 |
model-index:
|
12 |
- name: en_legal_ner_sm
|
13 |
+
results:
|
14 |
+
- task:
|
15 |
+
type: token-classification
|
16 |
+
name: Named Entity Recognition
|
17 |
+
dataset:
|
18 |
+
type: Named Entity Recognition
|
19 |
+
name: InLegalNER
|
20 |
+
split: Test
|
21 |
+
metrics:
|
22 |
+
- type: F1-Score
|
23 |
+
value: 75.078
|
24 |
+
name: Test F1-Score
|
25 |
+
---
|
26 |
+
## This model is for efficiency purposes for better accuracy refer to [en_legal_ner_trf](https://huggingface.co/opennyaiorg/en_legal_ner_tr)
|
27 |
+
---
|
28 |
+
# To Update
|
29 |
+
|
30 |
+
[AUTHORS] "[PAPER NAME]". [PAPER DETAILS] [PAPER LINK]
|
31 |
+
|
32 |
---
|
33 |
Indian Legal Named Entity Recognition: Identifying relevant entities in an Indian legal document
|
34 |
|
|
|
37 |
| **Name** | `en_legal_ner_sm` |
|
38 |
| **Version** | `3.2.0` |
|
39 |
| **spaCy** | `>=3.2.2,<3.3.0` |
|
40 |
+
| **Default Pipeline** | `token2vec`, `ner` |
|
41 |
+
| **Components** | `token2vec`, `ner` |
|
42 |
| **Vectors** | 0 keys, 0 unique vectors (0 dimensions) |
|
43 |
+
| **Sources** | [InLegalNER Train Data](https://storage.googleapis.com/indianlegalbert/OPEN_SOURCED_FILES/NER/NER_TRAIN.zip) [GitHub](https://github.com/Legal-NLP-EkStep/legal_NER)|
|
44 |
| **License** | `MIT` |
|
45 |
+
| **Author** | [Aman Tiwari](https://www.linkedin.com/in/amant555/) |
|
46 |
+
|
47 |
+
## Load Pretrained Model
|
48 |
+
|
49 |
+
Install the model using pip
|
50 |
+
|
51 |
+
```sh
|
52 |
+
pip install https://huggingface.co/opennyaiorg/en_legal_ner_sm/resolve/main/en_legal_ner_sm-any-py3-none-any.whl
|
53 |
+
```
|
54 |
+
|
55 |
+
Using pretrained NER model
|
56 |
+
|
57 |
+
```python
|
58 |
+
# Using spacy.load().
|
59 |
+
import spacy
|
60 |
+
nlp = spacy.load("en_legal_ner_sm")
|
61 |
+
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"
|
62 |
+
doc = nlp(text)
|
63 |
+
|
64 |
+
# Print indentified entites
|
65 |
+
for ent in doc.ents:
|
66 |
+
print(ent,ent.label_)
|
67 |
+
|
68 |
+
##OUTPUT
|
69 |
+
#Section 319 PROVISION
|
70 |
+
#Cr.P.C. STATUTE
|
71 |
+
#G. Sambiah RESPONDENT
|
72 |
+
#20th June 1984 DATE
|
73 |
+
```
|
74 |
+
|
75 |
|
76 |
### Label Scheme
|
77 |
|
|
|
79 |
|
80 |
<summary>View label scheme (14 labels for 1 components)</summary>
|
81 |
|
82 |
+
| ENTITY | BELONGS TO |
|
83 |
| --- | --- |
|
84 |
+
| `LAWYER` | PREAMBLE |
|
85 |
+
| `COURT` | PREAMBLE, JUDGEMENT |
|
86 |
+
| `JUDGE` | PREAMBLE, JUDGEMENT |
|
87 |
+
| `PETITIONER` | PREAMBLE, JUDGEMENT |
|
88 |
+
| `RESPONDENT` | PREAMBLE, JUDGEMENT |
|
89 |
+
| `CASE_NUMBER` | JUDGEMENT |
|
90 |
+
| `GPE` | JUDGEMENT |
|
91 |
+
| `DATE` | JUDGEMENT |
|
92 |
+
| `ORG` | JUDGEMENT |
|
93 |
+
| `STATUTE` | JUDGEMENT |
|
94 |
+
| `WITNESS` | JUDGEMENT |
|
95 |
+
| `PRECEDENT` | JUDGEMENT |
|
96 |
+
| `PROVISION` | JUDGEMENT |
|
97 |
+
| `OTHER_PERSON` | JUDGEMENT |
|
98 |
|
99 |
</details>
|
100 |
|
|
|
102 |
|
103 |
| Type | Score |
|
104 |
| --- | --- |
|
105 |
+
| **F1-Score** | **75.078** |
|
106 |
+
| `Precision` | 73.043 |
|
107 |
+
| `Recall` | 77.229 |
|
108 |
+
|
109 |
+
|
110 |
+
## Author - Publication
|
111 |
+
|
112 |
+
```
|
113 |
+
[CITATION DETAILS]
|
114 |
+
```
|