Downloads · 30 days
27
9% of all-time downloads
Prikshit7766/bert-finetuned-ner
bert-finetuned-ner is a token classification model from Prikshit7766. Use it when you need labels on individual words, such as names. It is set up for transformers.
This model was trained on the CoNLL 2003 dataset for Named Entity Recognition (NER) tasks.
Downloads · 30 days
27
9% of all-time downloads
All-time downloads
295
Public
Parameters
108M
431 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors431 MB · 100%
From the Hugging Face model README
This model was trained on the CoNLL 2003 dataset for Named Entity Recognition (NER) tasks.
The dataset includes the following labels:
O, B-PER, I-PER, B-ORG, I-ORG, B-LOC, I-LOC, B-MISC, I-MISCFor detailed descriptions of these labels, please refer to the dataset card.
bert-base-cased for token classification2e-5200.01epochepochAdditional default parameters from the Hugging Face Transformers library were used.
| Entity Type | Precision | Recall | F1 Score |
|---|---|---|---|
| LOC | 97.27% | 97.11% | 97.19% |
| MISC | 87.46% | 91.54% | 89.45% |
| ORG | 93.37% | 93.44% | 93.40% |
| PER | 96.02% | 98.15% | 97.07% |
| Entity Type | Precision | Recall | F1 Score |
|---|---|---|---|
| LOC | 92.87% | 92.87% | 92.87% |
| MISC | 75.55% | 82.76% | 78.99% |
| ORG | 88.32% | 90.61% | 89.45% |
| PER | 95.28% | 96.23% | 95.75% |
You can load the model directly from the Hugging Face Model Hub:
from transformers import pipeline
# Replace with your specific model checkpoint
model_checkpoint = "Prikshit7766/bert-finetuned-ner"
token_classifier = pipeline(
"token-classification",
model=model_checkpoint,
aggregation_strategy="simple"
)
# Example usage
result = token_classifier("My name is Sylvain and I work at Hugging Face in Brooklyn.")
print(result)
[
{
"entity_group":"PER",
"score":0.9999881,
"word":"Sylvain",
"start":11,
"end":18
},
{
"entity_group":"ORG",
"score":0.99961376,
"word":"Hugging Face",
"start":33,
"end":45
},
{
"entity_group":"LOC",
"score":0.99989843,
"word":"Brooklyn",
"start":49,
"end":57
}
]