Skip to content

Canonical representation / normalization [mp]

Micro pattern

Description

Convert equivalent inputs to a stable representation before comparing, grouping, or hashing them.

Problems

Normalize text

Remove irrelevant syntax or standardize text so equivalent values match.

Canonical key for equivalent objects

Build a key shared by objects in the same equivalence class.