Skip to content

Guides

Choose a string measure, interpret its scores, and plan for performance with strsimpy 0.5.0.

The algorithm pages explain how each measure works. These guides cover the decisions around them: which measure to reach for, what the numbers mean when implementations disagree, and where the time and memory go.

What these guides assume

  • The examples target strsimpy 0.5.0 on Python 3.10 or newer.
  • Classes are imported from the package root. The historical per-module imports, such as from strsimpy.levenshtein import Levenshtein, also work.
  • Outputs shown in comments and result blocks were produced by 0.5.0. Floating point values are printed at full precision, so some are mathematically exact fractions and some are their nearest binary representations.

A quick map

If you need to… Read…
Pick a measure for typo correction, edit counts, set similarity, tokens, alignment, compression or diff-style matching Choosing an algorithm
Understand why a score differs from TextDistance, or what a negative alignment score or a non-zero identical-string NCD means Semantics and divergences
Decide between score() and alignment(), cache shingle profiles, or reason about Unicode length Performance
Look up a constructor, return type, ABC or pickle guarantee API reference
See what changed in the current release Changelog
  • API reference lists every public class, its module, constructor defaults, methods, return types, ABC registrations and pickle support.
  • Changelog summarizes the 0.5.0 release and points to the full GitHub release history.

Type to search…

↑↓ navigate↵ selectEsc close