Extract entities and patterns from text with spaCy

8 steps · about 3 h 25 min · Beginner

  1. Practise the basics interactively (interactive, spaCy course, 40 min)

    Hands-on exercises in the browser build the habit of working with Doc, Token and Span objects.

  2. Understand pipelines and shared objects (doc, spaCy, 25 min)

    Know what each pipeline component adds to a document before mixing statistical and rule-based steps.

  3. Read tokens, parts of speech and entities (doc, spaCy, 30 min)

    These annotations are the raw material for every extraction rule and every downstream feature.

  4. Match phrases and token patterns (doc, spaCy, 30 min)

    Rules capture product codes, dates or domain phrases precisely where a statistical model would guess.

  5. Add domain entities with patterns (reference, spaCy, 15 min)

    An entity ruler lets known names override or complement the model's own predictions.

  6. Visualise entities and dependencies (doc, spaCy, 10 min)

    Seeing highlighted entities makes errors obvious and helps explain results to others.

  7. Train a custom entity model (doc, spaCy, 40 min)

    When rules are not enough, a small annotated set and a training config teach the model new labels.

  8. Evaluate the model on held-out text (reference, spaCy, 15 min)

    Precision, recall and F-score per label show whether the trained model actually beats your rules.