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|
+
library_name: span-marker
|
3 |
+
tags:
|
4 |
+
- span-marker
|
5 |
+
- token-classification
|
6 |
+
- ner
|
7 |
+
- named-entity-recognition
|
8 |
+
- generated_from_span_marker_trainer
|
9 |
+
metrics:
|
10 |
+
- precision
|
11 |
+
- recall
|
12 |
+
- f1
|
13 |
+
widget:
|
14 |
+
- text: The seven-judge Constitution Bench of the Supreme Court in SBP and Co. (supra)
|
15 |
+
while reversing earlier five-judge Constitution Bench judgment in Konkan Railway
|
16 |
+
Corpn. Ltd. vs. Rani Construction (P) Ltd., (2002) 2 SCC 388 held that the power
|
17 |
+
exercised by the Chief Justice of the High Court or the Chief justice of India
|
18 |
+
under Section 11(6) of the Arbitration Act is not an administrative power but
|
19 |
+
is a judicial power.
|
20 |
+
- text: 'In The High Court Of Judicature At Patna Criminal Writ Jurisdiction Case
|
21 |
+
No.160 of 2021 Arising Out of Ps. Case No.-58 Year-2020 Thana- Bakhari District-
|
22 |
+
Begusarai ====================================================== Hanif Ur Rahman,
|
23 |
+
son of Azhar Rahman, Resident of C-39, East Nizamuddin, New Delhi....... Petitioner
|
24 |
+
Versus 1. The State of Bihar (through Chief Secretary, Govt. of Bihar) Main Secretariat,
|
25 |
+
Patna - 800015. 2. Meena Khatoon, wife of Mastan @ Noor Mohammad, Resident of
|
26 |
+
Village- Mansurpur Chaksikandar, P.S.- Bidupur, District- Vaishali (Bihar) 3.
|
27 |
+
The Bihar Police, through Standing Counsel. 4. Child Welfare Committee, through
|
28 |
+
Chairperson, Chanakyanagar, Mahmadpur, Begusarai. 5. The Superintendent, Alpawas
|
29 |
+
Grih, Nirala Nagar, Behind G.D. College, Ratanpur, Begusarai....... Respondents
|
30 |
+
====================================================== Appearance:For the Petitioner:Ms.
|
31 |
+
Kriti Awasthi, Advocate Mr. Sambhav Gupta, Advocate Mr. Navnit Kumar, Advocate
|
32 |
+
Mr. Shyam Kumar, Advocate For the Respondents:Mr.Nadim Seraj, G.P.5 For the Resp.
|
33 |
+
No. 2:Ms. Archana Sinha, Advocate For the Resp. No. 4:Mr. Prabhu Narain Sharma,
|
34 |
+
Advocate ====================================================== Coram: Honourable
|
35 |
+
Mr. Justice Rajeev Ranjan Prasad C.A.V. Judgment'
|
36 |
+
- text: '1 R In The High Court Of Karnataka At Bengaluru Dated This The 19Th Day Of
|
37 |
+
February, 2021 Before The Hon''Ble Mr. Justice H.P. Sandesh Criminal Appeal No.176/2011
|
38 |
+
Between: Sri G.L. Jagadish, S/O Sri G.N. Lingappa, Aged About 52 Years, Residing
|
39 |
+
At No.29, 3Rd Main, Basaveshwara Housing Society Layout, Vijayanagar, Near Bts
|
40 |
+
Depot, Bengaluru-40....Appellant [By Sri H. Ramachandra, Advocate For Sri H.R.
|
41 |
+
Anantha Krishna Murthy And Associates - (Through V.C.)] And: Smt. Vasantha Kokila,
|
42 |
+
W/O Late N.R. Somashekhar, Aged About 58 Years, Residing At No.322, 8Th Main,
|
43 |
+
3Rd Stage, 4Th Block, Basaveshwaranagar, Bengaluru....Respondent [By Sri K.R.
|
44 |
+
Lakshminarayana Rao, Advocate] This Criminal Appeal Is Filed Under Section 378(4)
|
45 |
+
Of Cr.P.C. Praying To Set Aside The Order Dated 06.07.2010 Passed By The P.O.
|
46 |
+
Ftc-Ii, Bengaluru In Crl.A. No.470/2009 And Confirming The Order Dated 27.05.2009
|
47 |
+
Passed By The Xxii Acmm And Xxiv Ascj, Bengaluru In C.C.No.17229/2004 Convicting
|
48 |
+
The Respondent/Accused For The Offence Punishable Under Section 138 Of Ni Act.
|
49 |
+
2 This Criminal Appeal Having Been Heard And Reserved For Orders On 06.02.2021
|
50 |
+
This Day, The Court Pronounced The Following: Judgment'
|
51 |
+
- text: The petition was filed through Sh. Vijay Pahwa, General Power of Attorney
|
52 |
+
and it was asserted in the petition under Section 13-B of the Rent Act that 1
|
53 |
+
of 23 50% share of the demised premises had been purchased by the landlord from
|
54 |
+
Sh. Vinod Malhotra vide sale deed No.4226 registered on 20.12.2007 with Sub Registrar,
|
55 |
+
Chandigarh.
|
56 |
+
- text: Mr. Arun Bharadwaj, ld. CGSC, appearing for the Union of India, has Signature
|
57 |
+
Not Verified Digitally Signed By:PRATHIBA M SINGH Signing Date:09.10.2020 16:15
|
58 |
+
Digitally Signed By:SINDHU KRISHNAKUMAR Signing Date:09.10.2020 16:50:02 reiterated
|
59 |
+
the submissions made by Dr. Singhvi and has further submitted that this petition
|
60 |
+
ought to be heard with the OA No. 291/138/2020 pending before the CAT.
|
61 |
+
pipeline_tag: token-classification
|
62 |
+
model-index:
|
63 |
+
- name: SpanMarker
|
64 |
+
results:
|
65 |
+
- task:
|
66 |
+
type: token-classification
|
67 |
+
name: Named Entity Recognition
|
68 |
+
dataset:
|
69 |
+
name: Unknown
|
70 |
+
type: unknown
|
71 |
+
split: eval
|
72 |
+
metrics:
|
73 |
+
- type: f1
|
74 |
+
value: 0.9099756690997567
|
75 |
+
name: F1
|
76 |
+
- type: precision
|
77 |
+
value: 0.9089703932832524
|
78 |
+
name: Precision
|
79 |
+
- type: recall
|
80 |
+
value: 0.9109831709477414
|
81 |
+
name: Recall
|
82 |
+
---
|
83 |
+
|
84 |
+
# SpanMarker
|
85 |
+
|
86 |
+
This is a [SpanMarker](https://github.com/tomaarsen/SpanMarkerNER) model that can be used for Named Entity Recognition.
|
87 |
+
|
88 |
+
## Model Details
|
89 |
+
|
90 |
+
### Model Description
|
91 |
+
- **Model Type:** SpanMarker
|
92 |
+
<!-- - **Encoder:** [Unknown](https://huggingface.co/unknown) -->
|
93 |
+
- **Maximum Sequence Length:** 128 tokens
|
94 |
+
- **Maximum Entity Length:** 6 words
|
95 |
+
<!-- - **Training Dataset:** [Unknown](https://huggingface.co/datasets/unknown) -->
|
96 |
+
<!-- - **Language:** Unknown -->
|
97 |
+
<!-- - **License:** Unknown -->
|
98 |
+
|
99 |
+
### Model Sources
|
100 |
+
|
101 |
+
- **Repository:** [SpanMarker on GitHub](https://github.com/tomaarsen/SpanMarkerNER)
|
102 |
+
- **Thesis:** [SpanMarker For Named Entity Recognition](https://raw.githubusercontent.com/tomaarsen/SpanMarkerNER/main/thesis.pdf)
|
103 |
+
|
104 |
+
### Model Labels
|
105 |
+
| Label | Examples |
|
106 |
+
|:-------------|:------------------------------------------------------------------------------------------------------------------------------------|
|
107 |
+
| CASE_NUMBER | "Section 80", "Section 66 (1)", "Section 26-A" |
|
108 |
+
| COURT | "(1962) 45 ITR 210 (SC)", "Writ Appeal No. 479 of 2005.", "CMA No. 6727 of 93" |
|
109 |
+
| DATE | "A. SHANKAR NARAYANA", "B.N. Srikrishna,", "(Jarat" |
|
110 |
+
| GPE | "Hongkong Bank", "HDFC Bank, Noida,", "Rahul & Co." |
|
111 |
+
| JUDGE | "Chandigarh", "UP", "Lakhaya," |
|
112 |
+
| LAWYER | "the", "Vijay Mishra", "Chandregowda" |
|
113 |
+
| ORG | "The", "A. Sandeep", "For" |
|
114 |
+
| OTHER_PERSON | "Indian Income-tax Act", "POTA", "Indian Income-tax Act, 1922," |
|
115 |
+
| PETITIONER | "Supreme Court.", "Supreme Court,", "Sessions Judge Jaipur City," |
|
116 |
+
| PRECEDENT | "C.C. Alavi Hazi Vs.Palapetty Mohd. & Anr", "Susamma Thomas, 1994 ACJ 1 (SC),", "United India Insurance Co. Ltd. v. Rajendra Singh" |
|
117 |
+
| PROVISION | "Jagdish Prasad Sharma,", "Bhanwarial,", "Amarsingh," |
|
118 |
+
| RESPONDENT | "19.8.1998", "28 March, 1959,", "29.4.1968," |
|
119 |
+
| STATUTE | "Kaur,", "Tarlochan Singh.", "Agya" |
|
120 |
+
| WITNESS | "Manju", "Sameer.", "Abid @ Guddu" |
|
121 |
+
|
122 |
+
## Uses
|
123 |
+
|
124 |
+
### Direct Use for Inference
|
125 |
+
|
126 |
+
```python
|
127 |
+
from span_marker import SpanMarkerModel
|
128 |
+
|
129 |
+
# Download from the 🤗 Hub
|
130 |
+
model = SpanMarkerModel.from_pretrained("lambdavi/span-marker-luke-legal")
|
131 |
+
# Run inference
|
132 |
+
entities = model.predict("The petition was filed through Sh. Vijay Pahwa, General Power of Attorney and it was asserted in the petition under Section 13-B of the Rent Act that 1 of 23 50% share of the demised premises had been purchased by the landlord from Sh. Vinod Malhotra vide sale deed No.4226 registered on 20.12.2007 with Sub Registrar, Chandigarh.")
|
133 |
+
```
|
134 |
+
|
135 |
+
### Downstream Use
|
136 |
+
You can finetune this model on your own dataset.
|
137 |
+
|
138 |
+
<details><summary>Click to expand</summary>
|
139 |
+
|
140 |
+
```python
|
141 |
+
from span_marker import SpanMarkerModel, Trainer
|
142 |
+
|
143 |
+
# Download from the 🤗 Hub
|
144 |
+
model = SpanMarkerModel.from_pretrained("lambdavi/span-marker-luke-legal")
|
145 |
+
|
146 |
+
# Specify a Dataset with "tokens" and "ner_tag" columns
|
147 |
+
dataset = load_dataset("conll2003") # For example CoNLL2003
|
148 |
+
|
149 |
+
# Initialize a Trainer using the pretrained model & dataset
|
150 |
+
trainer = Trainer(
|
151 |
+
model=model,
|
152 |
+
train_dataset=dataset["train"],
|
153 |
+
eval_dataset=dataset["validation"],
|
154 |
+
)
|
155 |
+
trainer.train()
|
156 |
+
trainer.save_model("lambdavi/span-marker-luke-legal-finetuned")
|
157 |
+
```
|
158 |
+
</details>
|
159 |
+
|
160 |
+
<!--
|
161 |
+
### Out-of-Scope Use
|
162 |
+
|
163 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
164 |
+
-->
|
165 |
+
|
166 |
+
<!--
|
167 |
+
## Bias, Risks and Limitations
|
168 |
+
|
169 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
170 |
+
-->
|
171 |
+
|
172 |
+
<!--
|
173 |
+
### Recommendations
|
174 |
+
|
175 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
176 |
+
-->
|
177 |
+
|
178 |
+
## Training Details
|
179 |
+
|
180 |
+
### Training Set Metrics
|
181 |
+
| Training set | Min | Median | Max |
|
182 |
+
|:----------------------|:----|:--------|:-----|
|
183 |
+
| Sentence length | 3 | 44.5113 | 2795 |
|
184 |
+
| Entities per sentence | 0 | 2.7232 | 68 |
|
185 |
+
|
186 |
+
### Training Hyperparameters
|
187 |
+
- learning_rate: 0.0001
|
188 |
+
- train_batch_size: 8
|
189 |
+
- eval_batch_size: 8
|
190 |
+
- seed: 42
|
191 |
+
- gradient_accumulation_steps: 2
|
192 |
+
- total_train_batch_size: 16
|
193 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
194 |
+
- lr_scheduler_type: linear
|
195 |
+
- lr_scheduler_warmup_ratio: 0.06
|
196 |
+
- num_epochs: 5
|
197 |
+
|
198 |
+
### Training Results
|
199 |
+
| Epoch | Step | Validation Loss | Validation Precision | Validation Recall | Validation F1 | Validation Accuracy |
|
200 |
+
|:------:|:----:|:---------------:|:--------------------:|:-----------------:|:-------------:|:-------------------:|
|
201 |
+
| 0.9997 | 1837 | 0.0137 | 0.7773 | 0.7994 | 0.7882 | 0.9577 |
|
202 |
+
| 2.0 | 3675 | 0.0090 | 0.8751 | 0.8348 | 0.8545 | 0.9697 |
|
203 |
+
| 2.9997 | 5512 | 0.0077 | 0.8777 | 0.8959 | 0.8867 | 0.9770 |
|
204 |
+
| 4.0 | 7350 | 0.0061 | 0.8941 | 0.9083 | 0.9011 | 0.9811 |
|
205 |
+
| 4.9986 | 9185 | 0.0064 | 0.9090 | 0.9110 | 0.9100 | 0.9824 |
|
206 |
+
|
207 |
+
### Framework Versions
|
208 |
+
- Python: 3.10.12
|
209 |
+
- SpanMarker: 1.5.0
|
210 |
+
- Transformers: 4.36.0
|
211 |
+
- PyTorch: 2.0.0
|
212 |
+
- Datasets: 2.17.1
|
213 |
+
- Tokenizers: 0.15.0
|
214 |
+
|
215 |
+
## Citation
|
216 |
+
|
217 |
+
### BibTeX
|
218 |
+
```
|
219 |
+
@software{Aarsen_SpanMarker,
|
220 |
+
author = {Aarsen, Tom},
|
221 |
+
license = {Apache-2.0},
|
222 |
+
title = {{SpanMarker for Named Entity Recognition}},
|
223 |
+
url = {https://github.com/tomaarsen/SpanMarkerNER}
|
224 |
+
}
|
225 |
+
```
|
226 |
+
|
227 |
+
<!--
|
228 |
+
## Glossary
|
229 |
+
|
230 |
+
*Clearly define terms in order to be accessible across audiences.*
|
231 |
+
-->
|
232 |
+
|
233 |
+
<!--
|
234 |
+
## Model Card Authors
|
235 |
+
|
236 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
237 |
+
-->
|
238 |
+
|
239 |
+
<!--
|
240 |
+
## Model Card Contact
|
241 |
+
|
242 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
243 |
+
-->
|