Changed
-
allow the usage of
Hammingfor different string lengths. Length differences are handled as
insertions / deletions -
remove support for boolean preprocessor functions in
rapidfuzz.fuzzandrapidfuzz.process.
The processor argument is now always a callable or None. -
update defaults of the processor argument to be
Noneeverywhere. For affected functions this can change results, since strings are no longer preprocessed. To get back the old behaviour passprocessor=utils.default_processto these functions. The following functions are affected by this:process.extract,process.extract_iter,process.extractOnefuzz.token_sort_ratio,fuzz.token_set_ratio,fuzz.token_ratio,fuzz.partial_token_sort_ratio,fuzz.partial_token_set_ratio,fuzz.partial_token_ratio,fuzz.WRatio,fuzz.QRatio
-
rapidfuzz.processno longer calls scorers withprocessor=None. For this reason user provided scorers no longer require this argument. -
remove option to pass keyword arguments to scorer via
**kwargsinrapidfuzz.process. They can be passed
via ascorer_kwargsargument now. This ensures this does not break when extending function parameters and
prevents naming clashes. -
remove
rapidfuzz.string_metricmodule. Replacements for all functions are available inrapidfuzz.distance
Added
- added support for arbitrary hashable sequence in the pure Python fallback implementation of all functions in
rapidfuzz.distance - added support for
Noneandfloat("nan")inprocess.cdistas long as the underlying scorer supports it.
This is the case for all scorers returning normalized results.
Fixed
- fix division by zero in simd implementation of normalized metrics leading to incorrect results