strsimpy 0.5.0 is the current release. This page summarizes its public
changes; the complete history for 0.4.x and earlier is maintained on
GitHub Releases.
0.5.0
New token and set measures
- Added
Tversky,Tanimoto,BagandMongeElkan. Tverskyuses k-shingle sets, not multisets, and validatesalphaandbeta.Tanimotoimplements the standard set coefficient, which equals Jaccard, not TextDistance’slog2variant.MongeElkanuses whitespace tokenization and the standard Monge-Elkan denominator.
New edit-based measures
- Added
MLIPNS, a binary product-name heuristic. - Added
StrCmp95, the US Census comparison routine, with ASCII-only confusion-table credit. - Added
RatcliffObershelpwithdifflib-compatible tie-breaking.
Sequence alignment
- Added
NeedlemanWunsch,SmithWatermanandGotoh. - Each exposes
score(s0, s1)andalignment(s0, s1). - Smith-Waterman returns the maximum matrix cell, the correct local-alignment score. Gotoh handles empty inputs explicitly and supports affine gaps.
Compression
- Added
NormalizedCompressionDistancewith a run-length encoder. - Only the
"rle"compressor is shipped. Values are compressor-dependent, identical inputs are not guaranteed to score 0, and results are not guaranteed to lie in[0, 1].
Documentation
- Documented semantics, limitations and divergences from TextDistance, including Tversky set semantics, the standard Tanimoto definition, asymmetric Ratcliff-Obershelp tie-breaking, raw alignment score APIs and the RLE-only compressor.
Upgrade notes
- The release is additive: the existing class names, constructor options, methods and per-module imports are unchanged.
- The package is a Rust extension exposed through PyO3. Prebuilt abi3 wheels
support Python 3.10 and newer on Linux, macOS and Windows; source builds
require Rust 1.85 or newer and
maturin. - Check the installed version with:
import strsimpy
print(strsimpy.__version__)0.5.0- Review Semantics, limitations and divergences before swapping a measure from another library, and use the API reference for the complete constructor and return-type index.
Full release history
The GitHub Releases page contains every published version, including the 0.4.x
series that added OptimalStringAlignment.alignment(), pickle support and the
Rust core: