Loading…
Loading…
This repository contains a fine-tuned DistilBERT model trained on the CoNLL-2003 dataset for Named Entity Recognition (NER). The model identifies and classifies named entities in English text.
The model recognizes four entity categories:
It uses the BIO tagging scheme to identify entity boundaries.
from transformers import pipeline
ner_pipeline = pipeline(
"ner",
model="mohammad748/distilbert-conll2003-ner",
aggregation_strategy="simple"
)
text = "Barack Obama was born in Hawaii."
results = ner_pipeline(text)
for entity in results:
print(entity)
The output includes the identified entities, their categories, confidence scores, and positions in the text.
distilbert/distilbert-base-uncased