eriktks/conll2003
Updated • 30.4k • 170
This model recognizes named entities in English text: People, Organizations, Locations, and Miscellaneous entities.
| Label | Meaning | Example |
|---|---|---|
| PER | Person names | Barack Obama, Elon Musk |
| ORG | Organizations | Apple Inc., United Nations |
| LOC | Locations | New York, Mount Everest |
| MISC | Miscellaneous | English, FIFA World Cup |
| Metric | Score |
|---|---|
| F1 Score | 0.9116 |
| Precision | 0.9041 |
| Recall | 0.9192 |
| Accuracy | 0.9827 |
from transformers import pipeline
# Load the model
ner = pipeline(
"token-classification",
model="samandar1105/named_entity-recognition",
aggregation_strategy="simple"
)
# Run inference
result = ner("Elon Musk founded SpaceX in Hawthorne, California.")
print(result)
# [
# {'entity_group': 'PER', 'word': 'Elon Musk', 'score': 0.998},
# {'entity_group': 'ORG', 'word': 'SpaceX', 'score': 0.997},
# {'entity_group': 'LOC', 'word': 'Hawthorne', 'score': 0.995},
# {'entity_group': 'LOC', 'word': 'California', 'score': 0.994},
# ]