← Lessons

quiz vs the machine

Gold1370

Machine Learning

Named Entity Recognition

Finding people, places, and organizations in text.

5 min read · core · beat Gold to climb

Named Entity Recognition

Named entity recognition, often shortened to NER, finds and classifies the named things in text. Given a sentence, it marks which spans are people, organizations, locations, dates, or amounts.

NER is framed as a tagging problem. Each token receives a label, and a common scheme is BIO tagging. A token tagged B begins an entity, a token tagged I continues the same entity, and O marks tokens outside any entity. This lets a multiword name like New York City stay grouped as a single location.

The task is harder than it looks because of ambiguity. Apple can be a fruit or a company, and Jordan can be a person or a country. The surrounding context decides, so good models read the whole sentence, not isolated words.

NER feeds many downstream systems:

  • Search, by linking mentions to real world entities
  • Question answering, by locating the entity an answer refers to
  • Knowledge graphs, by extracting structured facts from prose

Modern systems use neural sequence models that combine word embeddings with context, often topped by a layer that enforces valid label sequences. Earlier systems leaned on handcrafted features and gazetteers, which are lists of known names.

Key idea

Named entity recognition tags each token to locate and classify entities like people and places, using context to resolve ambiguous names.

Check yourself

Answer to earn rating on the learn ladder.

1. In BIO tagging, what does B mean?

2. Why does context matter for NER?

3. NER is most naturally framed as