Relations, Events, and Templates
Semantic roles answer "who did what" for one predicate; information extraction scales the idea to a whole corpus. This lesson turns unstructured text into structured data: relation extraction pulls entity-relation-entity triples out of sentences by patterns, supervision, and distant supervision; event and temporal extraction place those facts on a timeline; and template filling and knowledge-base population assemble them into a database a downstream system can query.
╌╌╌╌
This builds on semantic roles, which recovered who played what part in a single event. Information extraction takes the same question — who did what to whom — and runs it across an entire corpus, so the answers accumulate into a queryable store rather than a single predicate's argument list.
Information extraction
Semantic roles answer who did what
for one predicate. Information extraction
(IE) scales the idea to a whole corpus: it turns the unstructured information in
text into structured data — populating a relational database or a knowledge
graph that downstream applications can query.1 The running example is a
news snippet about airlines:
Citing high fuel prices, ORG United Airlines said TIME Friday it has increased fares by MONEY $6 per round trip… ORG American Airlines, a unit of ORG AMR Corp., immediately matched the move, spokesman PER Tim Wagner said.
Named-entity recognition — the sequence-labeling task that finds and types the bracketed spans — is the first stage; IE builds on top of it. Model-theoretically, NER is the identification of a class of unary relations (is-an-organization), and the relations we extract next are binary ones: sets of ordered tuples over the entities. From the snippet we recover that United is a unit of UAL, that Tim Wagner works for American, and that United serves several cities.
These relations coincide with the model-theoretic tuples of formal semantics: a relation is a set of ordered tuples over a domain , . United is a unit of UAL is the pair ; United serves Chicago, Dallas, Denver, San Francisco is four pairs in . Standard schemas exist: the ACE evaluation defines 17 relations (part-whole, org-affiliation, physical, …); UMLS defines 54 medical relations (Injury disrupts Physiological-Function); Wikipedia infoboxes yield millions of facts, packaged as RDF triples (Golden Gate Park — location — San Francisco) in datasets like DBpedia and Freebase.
Relation extraction
Relation extraction finds and classifies the semantic relations among the entities in a text. There are five families of algorithm, trading annotation cost against precision and recall.2
Patterns
The oldest method is hand-written lexico-syntactic patterns, introduced by Hearst for the hyponym (is-a) relation. The pattern
licenses the inference , so red algae such as Gelidium yields . Other Hearst patterns include NP, including NP and such NP as NP. Adding named- entity constraints tailors the idea to specific relations — PER, POSITION of ORG matches George Marshall, Secretary of State of the United States. Patterns are high-precision but low-recall, and building enough of them is laborious.
Supervised learning
With a hand-annotated corpus, relation extraction becomes ordinary supervised classification: find pairs of entities in a sentence, and classify the relation (if any) that holds between them.
- 1
- 2
- 3for all entity pairs in do
- 4if then
- 5
- 6return
An optional Related? gate is a cheap binary filter that skips unrelated pairs
before the expensive N-way classifier runs. Feature-based classifiers use the
headwords of the two mentions, the bag of words between them, their named-entity
types (M1:ORG, M2:PER), and the syntactic path between them. The neural version
delexicalizes and fine-tunes: feed the sentence to a pretrained encoder like BERT,
replace each entity span with its NER tag so the model cannot memorize specific
names, and put a linear classifier on top of the sentence representation.
Supervised systems are accurate when the test set resembles the training set, but labeling is expensive and the models are brittle across genres — which motivates the semi-supervised methods.
Bootstrapping
Bootstrapping starts from a handful of high-precision seed tuples and grows the relation itself. Given the seed Ryanair has a hub at Charleroi, it finds sentences mentioning both entities, generalizes the surrounding context into patterns (ORG, which uses LOC as a hub), and greps for new tuples with those patterns — which supply still more patterns, and so on.3
The danger is semantic drift: one bad pattern admits a wrong tuple (Sydney has a ferry hub at Circular Quay Sydney, Circular Quay), which spawns worse patterns, and the relation's meaning wanders. Bootstrapping systems therefore attach confidence values to patterns and tuples. A pattern 's confidence trades its accuracy on known tuples against its productivity, (hits among the tuples it matches, scaled by how many it finds), and evidence across the patterns supporting a tuple combines by a noisy-or,
so a tuple supported by several independent patterns is trusted more than one resting on a single match. Conservative thresholds keep the system from drifting.
Distant supervision
Distant supervision combines bootstrapping's use of seed facts with supervised
learning's rich features.4 Instead of a few seeds, it takes a large
database — Freebase has over 100,000 place-of-birth pairs — and, for every pair,
collects every sentence in a big corpus that mentions both entities:
- …Hubble was born in Marshfield…
- …Einstein, born (1879), Ulm…
- …Hubble's birthplace in Marshfield…
Each occurrence becomes a training instance for the tuple's relation, and features
are pooled across all the sentences for a tuple, yielding rich conjunctions like
M1=PER & M2=LOC & nextword="born" & path=…. A supervised classifier trained on
these, plus a no-relation class from random unrelated pairs, needs no hand-labeled
sentences at all.
Distant supervision inherits the strengths of each parent — many features, high- precision evidence, no genre-bound labeled corpus, and training tuples usable by neural models — but it is limited to relations for which a database already exists, and it tends toward lower precision. For relations with no database at all, unsupervised methods (Open IE, e.g. the ReVerb system) extract relations as raw strings — usually verb phrases — straight from the web: United, has a hub in, Chicago. Open IE handles an unbounded set of relations but leaves the strings un-canonicalized.
| Method | What it needs | Precision | Recall / coverage |
|---|---|---|---|
| Patterns | hand-written rules | high | low |
| Supervised | labeled corpus | high (in-genre) | limited, brittle |
| Bootstrapping | a few seed tuples | drifts if unchecked | grows with iterations |
| Distant supervision | a relation database | moderate | broad, database-bound |
| Unsupervised / Open IE | nothing but text | lower | very broad, uncanonical |
Events, times, and templates
Relations are static facts; a news story is also a sequence of events in time. Three further IE tasks put events on a timeline.5
Event extraction finds mentions of events — expressions denoting something that happened at a point or interval. Most events are verbs (increased, matched, said), but noun phrases introduce events too (the move, the increase), and some verbs do not (took effect marks a boundary, not an event). Event extraction is modeled as BIO sequence labeling plus a classifier for the event class (occurrence, state, reporting event like said) and its tense and aspect.
Temporal expressions — Friday, last week, two days from now, 3:30 P.M.
— are extracted (again by BIO tagging over TIMEX3-delimited spans) and then
normalized to a standard form so a machine can compute with them. Normalization
uses the ISO 8601 calendar: a fully qualified date April 24, 1916 becomes
1916-04-24; a relative expression is resolved against the document's temporal
anchor (its dateline). If the article is dated 2007-07-02 (ISO week 27), then
last week normalizes to 2007-W26 and the weekend to the duration P1WE
anchored to that week. The TimeML scheme records these as XML attributes:
<TIMEX3 type="DATE" value="2007-W26" anchorTimeID="t1"> last week </TIMEX3><TIMEX3 type="DURATION" value="P1WE" anchorTimeID="t1"> the weekend </TIMEX3>With events and times both tagged, a system can order them: the relation between two events is one of Allen's 13 temporal relations (before, overlaps, during, meets, …), classified by a feature-based model trained on the TimeBank corpus. The result is a partial timeline — the American fare increase came after United's.
Template filling and knowledge-base population
Many texts describe stereotypical situations — a script, in the older terminology — whose structure we know in advance. A fare raise, for instance, has a lead airline, an amount, an effective date, and a follower. Template filling finds documents that invoke such a script and fills a fixed set of slots:
FARE-RAISE-ATTEMPT: LEAD-AIRLINE: United Airlines AMOUNT: $6 EFFECTIVE-DATE: 2006-10-26 FOLLOWER: American AirlinesThe standard approach trains two systems: a template recognizer (a text classifier deciding whether the script is present) and, for each slot, a role-filler extractor (a classifier or sequence model that pulls the slot's value). Multiple mentions of one filler (United, United Airlines) are reconciled by coreference. Older systems like FASTUS handled richer, hierarchically nested templates with cascades of finite-state transducers over hand-written rules.
All of this feeds the largest goal, knowledge-base population: the tuples, events, and filled templates accumulate into a structured store — a relational database or knowledge graph — that a later system can query. Knowledge-based question answering runs against that store: a question is parsed into a query over the relations IE deposited, and the answer is looked up rather than read off a passage. Semantic roles told us who did what in one sentence; information extraction wrote it all down in a form a machine can reason over.
Footnotes
- Jurafsky & Martin, Ch. 17 intro; §17.1 — information extraction as text-to-structure, NER as unary relations, relations as model-theoretic tuples, ACE / UMLS schemas, and RDF triples from Wikipedia infoboxes. ↩
- Jurafsky & Martin, §17.2.1–17.2.2, §17.2.5 — the five families of relation-extraction algorithm; Hearst lexico-syntactic patterns; supervised feature-based and neural (BERT, NER-delexified) classifiers; and Open IE. ↩
- Jurafsky & Martin, §17.2.3 — bootstrapping from seed tuples, pattern generalization, semantic drift, and confidence values combined by the noisy-or model. ↩
- Jurafsky & Martin, §17.2.4 — distant supervision: a large relation database supplies many tuples, features are pooled across every matching sentence, and a supervised classifier (plus a
no-relationclass) is trained without hand-labeled sentences. ↩ - Jurafsky & Martin, §17.3–17.5 — temporal expression extraction and ISO 8601 normalization (TimeML
TIMEX3, temporal anchor), event extraction, Allen temporal relations and TimeBank ordering, template filling, and knowledge-base population. ↩
╌╌ END ╌╌