Downloads · 30 days
3
9% of all-time downloads
barflyman/gbert-legal-ner-ONNX
gbert-legal-ner-ONNX is a token classification model from barflyman. Use it when you need labels on individual words, such as names. It is set up for transformers.js.
This is an ONNX version of PaDaS-Lab/gbert-legal-ner. It was automatically converted and uploaded using this Hugging Face Space.
Downloads · 30 days
3
9% of all-time downloads
All-time downloads
32
Public
Repo size
1.1 GB
Likes
0
Public
Click a slice to open those files.
.onnx1.4 GB · 100%
From the Hugging Face model README
This is an ONNX version of PaDaS-Lab/gbert-legal-ner. It was automatically converted and uploaded using this Hugging Face Space.
See the pipeline documentation for token-classification: https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.TokenClassificationPipeline
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)
| 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.
@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},
}