Natural Language Processing

Named Entity Recognition (NER)

Named entity recognition (NER) is a natural language processing technique that finds and labels specific items in text, such as people, companies, dates, amounts, and identifiers, turning unstructured documents into structured fields.

What is named entity recognition?

Named entity recognition (NER) is a natural language processing technique that finds and labels specific items in text, such as people, organizations, places, dates, monetary amounts, and product codes. Given the sentence “Acme Fasteners shipped 400 units to the Dayton plant on March 3,” an NER model marks Acme Fasteners as an organization, 400 units as a quantity, Dayton as a location, and March 3 as a date. The output is structured data pulled from unstructured text.

Traditional NER models were trained with supervised learning on text where every entity was hand-labeled, and they recognized a fixed set of general categories. Modern approaches use fine-tuned transformer models or large language models with a prompt that lists the entity types wanted. That makes it practical to define custom entities, such as lot numbers, policy numbers, diagnosis codes, or docket numbers, without a labeling project.

Why named entity recognition matters

NER is the workhorse of document processing. Most of what a business wants from a contract, an invoice, a medical note, or an email is a handful of fields, and NER is how those fields get out. It feeds intelligent document processing pipelines, populates knowledge graphs, and supports PII redaction, where the entities found are the ones that must be masked before text is shared or used to train a model.

Named entity recognition in practice

A law firm processes discovery productions that run to hundreds of thousands of emails. An NER pass tags every person, company, date, and monetary amount in the corpus. Reviewers can then filter to messages that mention a particular executive and a particular counterparty in the same quarter, instead of reading everything. The same entity tags drive the privilege screen, flagging messages that name outside counsel for a second look.

What to watch for

  • Measure precision and recall separately per entity type; a model that finds every date but misses a third of the policy numbers is not ready.
  • Test on your own document formats, since scanned and OCR’d text produces errors that general models were never trained on.
  • Plan for entity resolution, because “Acme Corp,” “Acme Corporation,” and “ACME” must be linked to one record to be useful.
  • Decide what happens to extracted entities that are personal data; NER makes PII easier to find and therefore easier to leak.

← Back to AI Glossary