Model Pipeline - Named entity recognition
Named Entity Recognition (NER) finds and labels names of people, places, or things in text. It helps computers understand important words in sentences.
Named Entity Recognition (NER) finds and labels names of people, places, or things in text. It helps computers understand important words in sentences.
Loss
1.2 |*
0.9 | **
0.7 | ***
0.5 | ****
0.4 | *****
--------
Epochs| Epoch | Loss ↓ | Accuracy ↑ | Observation |
|---|---|---|---|
| 1 | 1.2 | 0.60 | Model starts learning, loss high, accuracy low |
| 2 | 0.9 | 0.72 | Loss decreases, accuracy improves |
| 3 | 0.7 | 0.80 | Model learns important patterns |
| 4 | 0.5 | 0.86 | Better recognition of entities |
| 5 | 0.4 | 0.90 | Model converges with good accuracy |
from transformers import pipeline
ner = pipeline('ner')
text = "Barack Obama was born in Hawaii on August 4, 1961."
results = ner(text)
print(results)results?from transformers import pipeline
ner = pipeline('ner')
text = "Apple is looking at buying U.K. startup for $1 billion"
results = ner(text, grouped_entities=True)
print(results)Pass the test and this pattern moves unknown