Changelog
All notable changes to simmetry will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[1.2.0] - 2026-06-05
Added
hamming_str— normalized Hamming similarity for equal-length strings. Registered as astringmetric.bm25— BM25 relevance score in [0, 1]. Asymmetric: measures how well a document satisfies a query. Registered as astringmetric.pairwise()now dispatches on input type: pass a list of strings →pairwise_strings, a list of tuples →pairwise_points, or an ndarray →pairwise_numpy. No manual import needed.available("string")now listshamming_strandbm25.- Module docstrings on
api.py,registry.py, andindex.py. pytest-covadded to[dev]extras.- ANN backend tests (auto-skip if hnswlib / faiss not installed).
- Custom metric registration test.
- NaN / inf propagation tests (88 passing, 2 skipped).
Changed
- Version bumped to
1.2.0.
[1.1.0] - 2026-06-05
Added
haversine_sim(a, b, scale_km=...)— geographic similarity in [0, 1] registered as thehaversine_simmetric.hamming— normalized Hamming similarity for equal-length sequences. Registered as avectormetric.cosine_distance—1 - cosine, registered as avectormetric for sklearn-compatible workflows.tversky— Tversky index for sets:|A∩B| / (|A∩B| + α|A\B| + β|B\A|). Defaults (α=β=1) equal Jaccard; α=β=0.5 equals Dice.pairwise()now supportshammingandcosine_distance.SimIndex.query()now converts ANN backend distances to similarities consistently.- Field presence validation in
similarity()for composite dict records. [ann]extra now installs bothhnswlibandfaiss-cpu.- CI test matrix covering Python 3.10–3.13 and NumPy 1.x / 2.x.
- GitHub Pages documentation site.
Changed
- Breaking:
haversine_kmis no longer a registered metric. Usehaversine_simas the metric; importhaversine_kmdirectly for raw km values. - Breaking: Auto-metric for 2-number tuples now returns
haversine_sim._is_point_likerestricted to tuples (not lists) within valid lat/lon ranges. pairwise_pointsandtopk_pointsdefault metric changed fromhaversine_kmtohaversine_sim.- Package description, Homepage URL, and classifier updated in
pyproject.toml. - Version bumped to
1.1.0.
[1.0.3] - 2026-03-15
Changed
haversine_kmnow returns geographic distance in kilometers instead of a normalized score.topk_points(..., metric="haversine_km")ranks by nearest distance first.
[1.0.2] - 2026-02-22
Added
- Point batch APIs:
pairwise_points()andtopk_points().
[1.0.1] - 2026-02-21
Added
- Optional Numba acceleration for
euclidean_sim/manhattan_simviasimmetry[fast].
[1.0.0] - 2026-02-21
Added
- Initial release: auto similarity, string/vector/point/set metrics, ANN support, composite records.