FastPolDeepNer is model for Named Entity Recognition, designed for easy use, training and configuration. The forerunner of this project is
PolDeepNer2
. The model implements a pipeline consisting of data processing and training using: hydra, pytorch, pytorch-lightning, transformers.
Here is how to use this model to get Named Entities in text:
from transformers import pipeline
ner = pipeline('ner', model='clarin-pl/FastPDN', aggregation_strategy='simple')
text = "Nazywam się Jan Kowalski i mieszkam we Wrocławiu."
ner_results = ner(text)
for output in ner_results:
print(output)
{'entity_group': 'nam_liv_person', 'score': 0.9996054, 'word': 'Jan Kowalski', 'start': 12, 'end': 24}
{'entity_group': 'nam_loc_gpe_city', 'score': 0.998931, 'word': 'Wrocławiu', 'start': 39, 'end': 48}
Here is how to use this model to get the logits for every token in text:
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("clarin-pl/FastPDN")
model = AutoModelForTokenClassification.from_pretrained("clarin-pl/FastPDN")
text = "Nazywam się Jan Kowalski i mieszkam we Wrocławiu."
encoded_input = tokenizer(text, return_tensors='pt')
output = model(**encoded_input)
Training data
The FastPDN model was trained on datasets (with 82 class versions) of kpwr and cen. Annotation guidelines are specified
here
.
Pretraining
FastPDN models have been fine-tuned, thanks to pretrained models:
FastPDN huggingface.co is an AI model on huggingface.co that provides FastPDN's model effect (), which can be used instantly with this clarin-pl FastPDN model. huggingface.co supports a free trial of the FastPDN model, and also provides paid use of the FastPDN. Support call FastPDN model through api, including Node.js, Python, http.
FastPDN huggingface.co is an online trial and call api platform, which integrates FastPDN's modeling effects, including api services, and provides a free online trial of FastPDN, you can try FastPDN online for free by clicking the link below.
clarin-pl FastPDN online free url in huggingface.co:
FastPDN is an open source model from GitHub that offers a free installation service, and any user can find FastPDN on GitHub to install. At the same time, huggingface.co provides the effect of FastPDN install, users can directly use FastPDN installed effect in huggingface.co for debugging and trial. It also supports api for free installation.