Articles → NLP → Named Entity Recognition In NLP
Named Entity Recognition In NLP
Purpose
Example
import spacy
nlp = spacy.load("en_core_web_sm")
doc = nlp("Barack Obama was born in Hawaii and served as the US President.")
for ent in doc.ents:
print(ent.text, ent.label_)
Output
Posted By - | Karan Gupta |
|
Posted On - | Monday, September 1, 2025 |