About
A transformer-based model for named entity recognition for Polish. The model was trained on the NKJP corpus to recognize 12 categories of NEs.
Usage
conda create -n pdn2_demo python=3.8
conda activate pdn2_demo
https://pypi.clarin-pl.eu/packages/poldeepner2-0.8.2-py3-none-any.whl
git clone https://huggingface.co/CodeNLP/pdn2_v08_nkjp_large
import poldeepner2
ner = poldeepner2.load("pdn2_v08_nkjp_large", device="cpu")
text = "Od 15 września 2023 roku premierem Łotwy jest Evika Siliņa"
for an in ner.process_text(text):
print(f"[{an.start}:{an.end}] {an.text} ({an.label})")
Expected output:
[3:24] 15 września 2023 roku (date)
[35:40] Łotwy (placeName_country)
[46:58] Evika Siliņa (persName)
[46:51] Evika (persName_forename)
[52:58] Siliņa (persName_surname)
Author
Michał Marcińczuk marcinczuk@gmail.com
License
- Downloads last month
- 12
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.