← AI Terminology
NER - Named Entity Recognition
Named Entity Recognition is an NLP task that identifies and classifies proper nouns in text into predefined categories — such as person names, organisations, locations, dates, monetary amounts, and product names — enabling structured information extraction from unstructured text.
It is one of the oldest and most practically useful NLP tasks.
It is one of the oldest and most practically useful NLP tasks.
Why It Matters in AI
NER converts unstructured text into structured data: a news article becomes a list of companies, people, and locations that can be queried, linked to knowledge bases, or stored in a database. It is the foundation of information extraction pipelines in finance (extract company names and financial figures), healthcare (identify drugs, diseases, and procedures), and legal (tag parties, statutes, and dates). Modern LLMs perform zero-shot NER, but specialised fine-tuned models still outperform them on domain-specific entities.
Key Points
| Aspect | Description |
|---|---|
| spaCy | nlp = spacy.load("en_core_web_lg"); doc = nlp(text); [(ent.text, ent.label_) for ent in doc.ents] |
| Models | BERT-based (RoBERTa-NER), spaCy NER pipeline, Flair — all competitive, fine-tuned per domain |
| Evaluation | Entity-level F1 score — both boundaries and label must match for a true positive |
| BIO tagging | Begin-Inside-Outside tagging: B-PER = start of person entity, I-PER = inside, O = no entity |
| Entity types | PER (person), ORG (organisation), LOC (location), DATE, MONEY, PRODUCT, EVENT — task-specific |
| Zero-shot NER | LLMs (GPT-4, Claude) can extract entities from any description without fine-tuning |
Simple Analogy
A reader highlighting a news article: yellow for people, blue for organisations, green for locations. NER automates this highlighting process at scale — extracting structured facts from millions of documents without human annotation of each one.
Common Usage Examples
nlp = spacy.load("en_core_web_trf"); doc = nlp("Apple acquired Intel's AI division in 2025.")[(ent.text, ent.label_) for ent in doc.ents]→[("Apple", "ORG"), ("Intel", "ORG"), ("2025", "DATE")]- HuggingFace:
pipeline("ner", model="dslim/bert-base-NER")— pretrained BERT NER - Fine-tune:
AutoModelForTokenClassification.from_pretrained("bert-base-uncased")with BIO-tagged dataset - Clinical NER: fine-tune on i2b2 or MIMIC datasets to extract diagnoses, drugs, and procedures
Summary
In short: NER identifies and classifies named entities (people, organisations, locations, dates) in text — the foundational NLP task that converts unstructured language into structured, queryable data.