File size: 1,715 Bytes
7da621f
fb9a997
 
 
05e979c
 
7da621f
fb9a997
 
 
 
 
 
 
 
 
d625a93
 
fb9a997
 
 
 
 
 
a2d7acd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5198f52
 
 
446223f
5198f52
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
language: de
datasets:
- Legal-Entity-Recognition
widget:
- text: "1. Das Bundesarbeitsgericht ist gemäß § 9 Abs. 2 Satz 2 ArbGG iVm. § 201 Abs. 1 Satz 2 GVG für die beabsichtigte Klage gegen den Bund zuständig ."
---

### German BERT for Legal NER

#### Use:

```python
from transformers import pipeline
from transformers import AutoTokenizer, AutoModelForTokenClassification

tokenizer = AutoTokenizer.from_pretrained("PaDaS-Lab/gbert-legal-ner", use_auth_token="AUTH_TOKEN")
model = AutoModelForTokenClassification.from_pretrained("PaDaS-Lab/gbert-legal-ner", use_auth_token="AUTH_TOKEN")

ner = pipeline("ner", model=model, tokenizer=tokenizer)
example = "1. Das Bundesarbeitsgericht ist gemäß § 9 Abs. 2 Satz 2 ArbGG iVm. § 201 Abs. 1 Satz 2 GVG für die beabsichtigte Klage gegen den Bund zuständig ."

results = ner(example)
print(results)
```

#### Classes:
|Abbreviation|Class|
|----|----|
|PER|Person|
|RR|Judge|
|AN|Lawyer|
|LD|Country|
|ST|City|
|STR|Street|
|LDS|Landscape|
|ORG|Organization|
|UN|Company|
|INN|Institution|
|GRT|Court|
|MRK|Brand|
|GS|Law|
|VO|Ordinance|
|EUN|European legal norm|
|VS|Regulation|
|VT|Contract|
|RS|Court decision|
|LIT|Legal literature|

---
Please reference our work when using the model.
```bibtex
@conference{icaart23,
  author={Harshil Darji. and Jelena Mitrović. and Michael Granitzer.},
  title={German BERT Model for Legal Named Entity Recognition},
  booktitle={Proceedings of the 15th International Conference on Agents and Artificial Intelligence - Volume 3: ICAART,},
  year={2023},
  pages={723-728},
  publisher={SciTePress},
  organization={INSTICC},
  doi={10.5220/0011749400003393},
  isbn={978-989-758-623-1},
  issn={2184-433X},
}
```