What is Named Entity Recognition (NER)?
The Core Problem NER Solves
Raw text is unstructured. A search query like "flights from New York to London next Friday" contains actionable information buried in natural language. Without NER, your system sees 8 words with no semantic meaning. With NER, you extract: LOCATION(New York), LOCATION(London), DATE(next Friday). Now you can query a flight database with structured parameters instead of fuzzy text matching.
The same principle applies across domains. Customer support tickets mention product names, account numbers, and dates that need routing. Legal documents reference company names and case citations that need indexing. Medical records contain drug names and conditions that need structured storage.
Why Pattern Matching Fails
You might think regex could solve this. It cannot. Consider "Apple" - is it the company, the fruit, or Apple Records? The answer depends on context. NER models learn these contextual signals from training data, distinguishing entity types based on surrounding words and sentence structure.
Evaluation Metrics
NER evaluation distinguishes exact match (span boundaries AND entity type correct) from partial match (overlapping spans with correct type). Extracting "New York" instead of "New York Times" scores well on partial match but poorly on exact match. Both matter, but exact match is the harder, more meaningful target.