Views
No views yet
bert-base-cased on a custom dataset of news articles annotated with named entities of type Person, Organization, and Location. It is designed to identify these entities from raw article text.PER, ORG, and LOCPerson, Organization, and Location entities from English news text.1from transformers import AutoTokenizer, AutoModelForTokenClassification
2from transformers import pipeline
3
4model = AutoModelForTokenClassification.from_pretrained("Saud-Shakeel/ner-bert-finetuned-person-org-loc")
5tokenizer = AutoTokenizer.from_pretrained("Saud-Shakeel/ner-bert-finetuned-person-org-loc")
6
7nlp = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="simple")
8
9text = "President Joe Biden met with officials from the United Nations in New York."
10entities = nlp(text)
11print(entities)PER, ORG, and LOCpersons, organizations, and locations fieldsbert-base-casedTrainer API with seqeval for evaluationseqeval)| Entity Type | Precision | Recall | F1 Score |
|---|---|---|---|
| PER | 0.89 | 0.84 | 0.86 |
| ORG | 0.85 | 0.79 | 0.82 |
| LOC | 0.91 | 0.87 | 0.89 |
1@misc{saud2025ner,
2 author = {Shakeel, Saud},
3 title = {NER-BERT fine-tuned for Person, Organization, and Location Extraction},
4 year = {2025},
5 url = {https://huggingface.co/Saud-Shakeel/ner-bert-finetuned-person-org-loc},
6 note = {Fine-tuned with Hugging Face Transformers}
7}