Skip to content

Text indel

github-actions[bot] edited this page Aug 22, 2026 · 26 revisions

Indel

Edits that may only add or remove, never replace — which is what makes it the measure behind rapidfuzz's fuzz.ratio.

Insertions and deletions only, never substitutions, so a substitution costs two. NormalizedSimilarity × 100 is rapidfuzz's fuzz.ratio, which is the reason this type is here rather than folded into Levenshtein.

Members

Member What it does
Indel.Distance Counts the fewest insertions and deletions that turn one string into the other, with substitution
Indel.NormalizedDistance Scales the distance into [0, 1] by dividing it by the sum of the two lengths.
Indel.NormalizedSimilarity 1 - NormalizedDistance, and — multiplied by 100 — exactly rapidfuzz's fuzz.ratio.

Lodestar

Project

Clone this wiki locally