Skip to content

Latest commit

 

History

History
144 lines (98 loc) · 5.17 KB

File metadata and controls

144 lines (98 loc) · 5.17 KB

Changelog

All notable changes to this project are documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning. Release dates are based on the Hex.pm release history.

Changed

  • Replaced the historical Simhash performance claim with a packaged, reproducible benchmark script using pinned Similarity, simhash-ex, and Benchee versions.

0.5.1 - 2026-08-23

Changed

  • Short-circuited identical Simhash comparisons and single-ngram binary hashes to avoid redundant hashing and bit normalization.

0.5.0 - 2026-08-23

Added

  • Added Credo 1.7.19 for strict static analysis in development and test environments.
  • Added StreamData property tests for similarity invariants, Unicode n-grams, vector lengths, and cosine stream pair generation.

Changed

  • Expanded the documentation and test coverage.
  • Added a GitHub Actions test workflow.
  • Updated ExDoc to 0.40, FastNgram to 1.3, and StreamData to 1.4.
  • Raised the minimum supported Elixir version from 1.7 to 1.14 and expanded CI to cover the minimum and current Elixir/Erlang runtimes.
  • Added CI checks for formatting, compiler warnings, strict Credo analysis, and 100% test coverage.
  • Improved Simhash performance by accumulating hash votes in one pass and replacing expanded fixed-size bit conversions with shared conversion functions.
  • Improved cosine pair comparisons by indexing attributes before matching them.
  • Reduced cosine vector calculations to one numeric pass, removed intermediate sets from attribute comparisons, and made cosine streams element-lazy.

Removed

  • Removed the undocumented Similarity.Cosine.stream_next/1 and Similarity.Cosine.do_add_attributes/3 implementation helpers from the public API.
  • Removed the unused Benchee development dependency.

Fixed

  • Corrected a typo in the Similarity.Cosine module documentation.
  • Fixed Similarity.Cosine.stream/1 crashing when it contains no entries.
  • Fixed comparisons without shared attributes raising an arithmetic error.
  • Replaced incidental errors for missing cosine entry IDs with a clear ArgumentError.
  • Added explicit errors for unequal-length and zero-magnitude cosine vectors.
  • Added consistent Simhash validation for n-gram sizes, hash functions, and return types.
  • Applied Sørensen–Dice length validation consistently to identical strings.
  • Rejected explicit invalid Simhash option values, validated Sørensen–Dice n-gram sizes, and added clear unequal-length errors to dot-product and Hamming helpers.

0.4.0 - 2022-12-29

Added

  • Added configurable :siphash, :md5, and :sha256 hash functions for Simhash.
  • Added the :binary return type to Similarity.Simhash.hash/2.

Changed

  • Changed Similarity.Simhash.hash to accept :ngram_size, :hash_function, and :return_type as keyword options.

0.3.0 - 2022-12-28

Changed

  • Replaced the :integer Simhash return type with explicit :int64_unsigned and :int64_signed return types.

0.2.4 - 2022-12-27

Fixed

  • Added an ArgumentError when either string passed to the Sorensen-Dice implementation is shorter than the configured n-gram size.

0.2.3 - 2022-12-27

Added

  • Added Sorensen-Dice similarity for strings, lists, and MapSet values through Similarity.SorensenDice and Similarity.sorensen_dice/3.

0.2.2 - 2022-12-27

Added

  • Added an integer return type to Similarity.Simhash.hash while retaining the list-of-bits return type.
  • Added an ArgumentError when a string passed to Simhash is shorter than the configured n-gram size.

Changed

  • Updated project dependencies and added Benchee as a development dependency.

0.2.1 - 2020-05-22

Fixed

  • Fixed Simhash binary-to-integer conversion so the result is always 64 bits.

0.2.0 - 2019-10-15

Added

  • Added Simhash string similarity and hash generation using character n-grams and SipHash.
  • Added Simhash tests, documentation, and benchmark results.

0.1.0 - 2019-06-18

Added

  • Initial release.
  • Added cosine similarity, cosine similarity scaled by the square root of vector length, Euclidean dot product, and Euclidean magnitude calculations.
  • Added Similarity.Cosine for accumulating IDs and their attributes, comparing entries, and streaming all unique similarity pairs.