liveBook · Manning

Entity and relationship extraction

As explained in AI-Powered Search

Entity extraction is the identification and extraction of entities from textual content.

Entity and relationship extraction turns query text into structured search meaning. Instead of treating “new york city” as unrelated keywords, it identifies phrases, maps spelling variants to canonical entities, and preserves semantic functions for later query interpretation. section 6.4.2 section 7.4.1

A practical extraction pipeline typically performs these steps:

  • Normalize the incoming query, tokenize it when necessary, and remove Boolean syntax such as AND and OR. section 6.4.2
  • Match query spans against a collection containing surface forms, canonical forms, entity types, spelling variations, and popularity values. section 7.4.1
  • Use an FST-backed lookup or Solr text tagger to extract matching entities efficiently from incoming text. section 7.4.1
  • Resolve competing matches, retain unmatched text as keywords, and build a typed query tree containing entities and their semantic functions. section 7.4.1

Parsing “top kimchi near charlotte”

The extractor identifies “top” as a popularity function, “near” as a location-distance function, and “charlotte” as a city entity. The remaining “kimchi” becomes a keyword. A resulting typed structure can represent popularity(query, position), the kimchi keyword, location_distance(query, position), and Charlotte with its geographic coordinates.

How AI-Powered Search covers it

How deep it goes
Explains normalization, lookup structures, tagging, ambiguity resolution, and typed query construction, while deferring FST internals.
Examples
Uses “new york city” and “top kimchi near charlotte” to demonstrate phrase matching, semantic functions, cities, keywords, and query trees.
What it assumes
Assumes searchable entity data and domain phrases, while teaching how to represent surface forms, canonical forms, types, and semantic functions.
What you can do after
Apply it via Apache Solr and Python-style extraction code to build tagged queries and typed semantic query trees.
How it connects
Connects entity extraction with semantic search, knowledge graphs, query parsing, finite state transducers, and relevance ranking.

Also explained in

Compare how 2 books explain entity and relationship extraction →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI-Powered Search. The section links point to the parts of the book it draws on.