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.
1from transformers import pipeline
2import torch
3import nltk
4
5ner_classifier = pipeline(
6 "ner",
7 model="arubenruben/NER-PT-BERT-CRF-HAREM-Selective",
8 device=torch.device("cuda:0") if torch.cuda.is_available() else torch.device("cpu"),
9 trust_remote_code=True
10)
11
12text = "FCPorto vence o Benfica por 5-0 no Estádio do Dragão"
13tokens = nltk.wordpunct_tokenize(text)
14result = 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.
Citation will be made available soon.