Model Pipeline - Data extraction from text
This pipeline takes raw text and finds useful pieces of information inside it. It cleans the text, finds important words or phrases, and then uses a model to pick out the data we want.
Jump into concepts and practice - no test required
This pipeline takes raw text and finds useful pieces of information inside it. It cleans the text, finds important words or phrases, and then uses a model to pick out the data we want.
1.2 |**************
0.9 |**********
0.7 |*******
0.5 |****
0.4 |***
+----------------
1 2 3 4 5 Epochs
| Epoch | Loss ↓ | Accuracy ↑ | Observation |
|---|---|---|---|
| 1 | 1.2 | 0.55 | Model starts learning, loss high, accuracy low |
| 2 | 0.9 | 0.68 | Loss decreases, accuracy improves |
| 3 | 0.7 | 0.75 | Model learns important patterns |
| 4 | 0.5 | 0.82 | Good improvement, model converging |
| 5 | 0.4 | 0.87 | Loss low, accuracy high, training stable |
data extraction from text in AI?extract_entities with a text input doc in Python?text = "Alice met Bob on 2023-04-01 in Paris." entities = extract_entities(text) print(entities)
extract_entities returns a list of tuples with (entity, type), what is the expected output?def extract_entities(text):
entities = []
for word in text.split():
if word.istitle():
entities.append((word, 'PERSON'))
return entities
text = "John and Mary went to London."
print(extract_entities(text))