Phase 05: NLP: Foundations to Advanced

Entity Linking & Disambiguation

NER found "Paris." Entity linking decides: Paris, France? Paris Hilton? Paris, Texas? Paris (the Trojan prince)? Without linking, your knowledge graph stays ambiguous. A sentence reads: "Jordan beat the press." Your NER tags "Jordan" as PERSON. Good. But which Jordan? Michael Jordan (basketball)? Michael B. Jordan (actor)? Michael I. Jordan (Berkeley ML professor — yes, this confusion is real in ML papers)? Jordan (the country)? Jordan (Hebrew first name)? Entity linking (EL) resolves each mention to a unique entry in a knowledge base: Wikidata, Wikipedia, DBpedia, or your domain KB. Two subtasks: Candidate generation. Given "Jordan," which KB entries are plausible? Disambiguation. Given the context, which candidate is the right one? Both steps are learnable. Both are benchmarked. The combined pipeline has been stable for a decade — what changes is the quality of the disambiguator. Entity linking pipeline: mention → candidates → disambiguated entity Candidate generation. Given the mention surface form ("Jordan"), look up candidates in an alias index. Wikipedia alias dictionaries cover most named entities: "JFK" → John F. Kennedy, Jacqueline Kennedy, JFK airport, JFK (movie). Typical index returns 10-30 candidates per mention. Disambiguation: three approaches. Prior + context (Milne & Witten, 2008). P(entity | mention) × context-similarity(entity, text). Works well, fast, no training. Embedding-based (ESS / REL / Blink). Encode mention + context. Encode each candidate's description.…

Entity Linking & Disambiguation: NER found "Paris." Entity linking decides: Paris, France? Paris Hilton? Paris, Texas? Paris (the Trojan prince)? Without…

This free lesson is part of the AI Engineering from Scratch curriculum. Read the full explanation, run the lesson code, and verify the result in the interactive reader or from the repository source.

Browse the complete course catalog or open this lesson on GitHub.