# Relation and Event Extraction

Source: https://www.potatoannotator.com/docs/guides/relation-and-event-extraction

**Relation extraction connects two entities with a typed link ("Marie Curie, *won*, Nobel Prize"). Event extraction goes further: it marks an event trigger and the roles around it (who did what, to whom, when).** Both turn flat text into structured knowledge.

See [Relationship extraction](https://en.wikipedia.org/wiki/Relationship_extraction) and [Event extraction](https://en.wikipedia.org/wiki/Event_extraction) for background.

## Relations: linking spans

A relation annotation has three parts: a head span, a tail span, and a relation type. In Potato, annotators first mark the spans, then draw a directed, typed link between them (span linking).

```yaml
annotation_schemes:
  - annotation_type: span
    name: entities
    description: "Mark the entities involved."
    labels: [PERSON, ORGANIZATION, AWARD]
  - annotation_type: span_link
    name: relations
    description: "Draw a link between two entities and choose the relation."
    labels: [won, works_for, located_in, founded_by]
```

Relations are directional, so decide and document the direction of each type (is it "founded_by" pointing from company to person, or the reverse?).

## Events: triggers and arguments

An event is anchored by a **trigger** word (often a verb like "acquired") and has **arguments** filling typed **roles** (Buyer, Seller, Price, Date). Potato's event annotation type lets annotators mark the trigger and attach role-labeled spans.

The [event annotation showcase](/showcase/event-annotation) demonstrates a working trigger-and-argument setup.

## Why these tasks are hard

- The label space is large, so agreement drops. Keep relation and role types few and well-defined.
- Annotators must first get the spans right; errors compound. Consider annotating entities in a first pass and relations in a second.
- Structured output makes agreement metrics non-trivial, measure at the level you care about (correct trigger, correct argument, correct full event).

## Further reading

- [Span Annotation](/docs/guides/span-annotation)
- [Coreference Resolution](/docs/guides/coreference-resolution)
- [Entity Linking](/docs/guides/entity-linking)
