Course contentsShow
← Machine Learning and Deep Learning
Lesson 1288 of 3,53829. Core NLP TasksFree lesson

NER Tag Schemes: IOB and BIOES

Understand Inside-Outside-Beginning and Begin-Inside-Outside-End-Single tagging schemes for marking entity boundaries.

NER Tag Schemes: IOB and BIOES

You'll learn: How to mark the boundaries of named entities in text using structured tagging schemes that tell models where entities begin, continue, and end.

Why Tag Schemes Matter

When performing Named Entity Recognition, you can't just label words with entity types like PERSON or LOCATION. Why? Because entities often span multiple words ("New York City"). You need a way to indicate:

  • Which word starts an entity
  • Which words continue it
  • Which words are outside any entity

That's where tag schemes come in.

IOB Tagging (Inside-Outside-Beginning)

The IOB scheme uses three prefixes:

  • B- (Beginning): First token of an entity
  • I- (Inside): Continuation tokens of an entity
  • O (Outside): Not part of any entity

Example:

"Barack Obama visited New York"
B-PER  I-PER  O       B-LOC I-LOC

Notice how multi-word entities get B- for the first word, then I- for the rest.

BIOES Tagging (Begin-Inside-Outside-End-Single)

The BIOES scheme is more explicit with five tags:

  • B- (Beginning): First token of a multi-token entity
  • I- (Inside): Middle tokens
  • E- (End): Last token of a multi-token entity
  • S- (Single): Single-token entity
  • O (Outside): Not part of any entity

Example:

"Barack Obama visited Paris"
B-PER  E-PER  O       S-LOC

BIOES makes boundaries crystal clear—you know exactly where entities end, and distinguish single-word entities explicitly.

Key Takeaway: IOB and BIOES schemes convert entity recognition into a sequence labeling problem where each token gets a boundary-aware tag, enabling models to correctly identify multi-word entities.