Views
No views yet
1from transformers import pipeline
2
3ner_pipeline = pipeline("ner", model="RGarrido03/modernbert-conll2003-ner-base", aggregation_strategy="simple")
4text = "The CERN headquarters are located in Geneva, Switzerland."
5results = ner_pipeline(text)
6
7for entity in results:
8 print(f"Entity: {entity['word']}, Label: {entity['entity_group']}, Score: {entity['score']:.4f}")| Metric | Value |
|---|---|
| Accuracy | 0.9711 |
| F1 Score | 0.8851 |
| Precision | 0.8721 |
| Recall | 0.8985 |
| Loss | 0.1873 |
| Metric | Value |
|---|---|
| Accuracy | 0.9871 |
| F1 Score | 0.9416 |
| Precision | 0.9357 |
| Recall | 0.9475 |
| Loss | 0.0625 |
1@inproceedings{tjong-kim-sang-de-meulder-2003-introduction,
2 title = "Introduction to the {CoNLL}-2003 Shared Task: Language-Independent Named Entity Recognition",
3 author = "Tjong Kim Sang, Erik F. and De Meulder, Fien",
4 booktitle = "Proceedings of the Seventh Conference on Natural Language Learning at {HLT}-{NAACL} 2003",
5 year = "2003",
6 url = "https://aclanthology.org/W03-0419",
7 pages = "142--147",
8}