Downloads · 30 days
25
2% of all-time downloads
arubenruben/NER-PT-BERT-CRF-HAREM-Selective
NER-PT-BERT-CRF-HAREM-Selective is a token classification model from arubenruben. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned BERT model adapted for Named Entity Recognition (NER) tasks. It utilizes Conditional Random Fields (CRF) as the decoder.
Downloads · 30 days
25
2% of all-time downloads
All-time downloads
1K
Public
Parameters
334M
4 GB on disk
Likes
1
Public
Click a slice to open those files.
.bin1.3 GB · 50%
From the Hugging Face model README
This model is a fine-tuned BERT model adapted for Named Entity Recognition (NER) tasks. It utilizes Conditional Random Fields (CRF) as the decoder.
The model follows the HAREM Selective labeling scheme for NER. Additionally, it provides options for HAREM Default and Conll-2003 labeling schemes.
You can employ this model using the Transformers library's pipeline for NER, or incorporate it as a conventional Transformer in the HuggingFace ecosystem.
from transformers import pipeline
import torch
import nltk
ner_classifier = pipeline(
"ner",
model="arubenruben/NER-PT-BERT-CRF-HAREM-Selective",
device=torch.device("cuda:0") if torch.cuda.is_available() else torch.device("cpu"),
trust_remote_code=True
)
text = "FCPorto vence o Benfica por 5-0 no Estádio do Dragão"
tokens = nltk.wordpunct_tokenize(text)
result = ner_classifier(tokens)
There is a Notebook available to test our code.
This model is integrated in the project PT-Pump-Up
The model was tested on the Miniharem Testset.
F1-Score: 0.832
Citation will be made available soon.
BibTeX: :(