Skip to main content

goldenfuzz

Fast, byte-identical-to-rapidfuzz fuzzy-string scorers, plus a one-vs-many extract / cdist / BatchComparator API. A thin PyO3 wheel over the pyo3-free goldenfuzz-core Rust crate.

import goldenfuzz as gf

gf.jaro_winkler("jonathan", "jonathon")      # -> 0.95...
gf.levenshtein("kitten", "sitting")          # normalized similarity in [0, 1]
gf.indel("fuzzy wuzzy", "wuzzy fuzzy")

# one-vs-many top-k (query bitmap built once)
gf.extract("jonathan smith",
           ["jon smith", "jane doe", "jonathan smith"],
           scorer="jaro_winkler", score_cutoff=0.7, limit=2)
# -> [(2, 1.0), (0, 0.9...)]

# reuse a prepared query across many choices
bc = gf.BatchComparator("acme corporation")
[bc.jaro_winkler(c) for c in choices]

Scorers: jaro_winkler | levenshtein | indel, each returning normalized similarity in [0, 1], byte-identical to the corresponding rapidfuzz metric (proven by an oracle fuzz in goldenfuzz-core). On short strings (names, addresses) goldenfuzz is faster than rapidfuzz; on documents it matches/beats on jaro-winkler and levenshtein.

fuzz.* composite scorers (drop-in for rapidfuzz fuzz)

The full weighted/token/partial family, each returning a score in [0, 100]:

gf.ratio("fname", "first_name")              # normalized indel, x100
gf.partial_ratio("fname", "first_name")      # best alignment of the shorter in the longer
gf.token_sort_ratio("a b c", "c b a")        # -> 100.0
gf.token_set_ratio("fuzzy was a bear", "fuzzy fuzzy was a bear")  # -> 100.0
gf.WRatio("fname", "first_name")             # weighted composite (rapidfuzz's fuzz.WRatio)
gf.QRatio("this is a test", "this is a test!")

Also token_ratio, partial_token_sort_ratio, partial_token_set_ratio, partial_token_ratio. Every one is verified byte-identical to rapidfuzz.fuzz over a 6.5k-pair corpus (all 10 scorers, worst abs diff 0.0), so it is a true drop-in — the value is the same, computed by our own kernel with no rapidfuzz at runtime.

Part of the golden suite.

Release files for goldenfuzz 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for goldenfuzz 0.2.0
File Size Uploaded
goldenfuzz-0.2.0.tar.gz 33.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for goldenfuzz 0.2.0
File
goldenfuzz-0.2.0-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
goldenfuzz-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details
goldenfuzz-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details
goldenfuzz-0.2.0-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details
goldenfuzz-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details

Total release size: 1.4 MB

Release files / goldenfuzz-0.2.0.tar.gz

Download URL goldenfuzz-0.2.0.tar.gz
Size 33.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6988af3a476036350f7399f284a2aac478ab44f887c820374b99e04a467dfe75
BLAKE2b-256 checksum
How to use checksums
6df6e5d3303b6efbed04b5b401e2f901611ae541ae3aff962bd46bf31c7c4578
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.13

Release files / goldenfuzz-0.2.0-cp311-abi3-win_amd64.whl

Download URL goldenfuzz-0.2.0-cp311-abi3-win_amd64.whl
Size 182.5 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
6b33d9e4c260d71e9e985c4a47cd71d2e972ff3e79f1b76da9e1487de84716a5
BLAKE2b-256 checksum
How to use checksums
f4379145ae69912021a361e54472db6bc9bf4707160ac7647c40c31d8153fd64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.13

Release files / goldenfuzz-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL goldenfuzz-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl
Size 315.5 kB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
2cb49218e3b2ea15d4a25859186384ae860dc975d24315574b112475a885d609
BLAKE2b-256 checksum
How to use checksums
8a3957b19a51541542d53565933dbc723529849d423ec83a0329d86bedbef5b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.13

Release files / goldenfuzz-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL goldenfuzz-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl
Size 310.6 kB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
7145a2ee951f6991b2f32ef0a351a265525b05caaaab1c6dfa192ceb64a83f6c
BLAKE2b-256 checksum
How to use checksums
25d57d7c306bafb15689300f8222571d6b9e93d9776bd5f0b64607ab38947668
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.13

Release files / goldenfuzz-0.2.0-cp311-abi3-macosx_11_0_arm64.whl

Download URL goldenfuzz-0.2.0-cp311-abi3-macosx_11_0_arm64.whl
Size 283.4 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
84901743357a80dd5401607996283752926720275c52655f09f7d743d1200cef
BLAKE2b-256 checksum
How to use checksums
1ba83ee24d82063f276a74cead9e23c3be9846d36cbda85c7a554e5d344a44d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.13

Release files / goldenfuzz-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl

Download URL goldenfuzz-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl
Size 287.8 kB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2a299e0b5037171efa26604b9bd0de5f1ee7c96ceb9966b7983407efa1431a40
BLAKE2b-256 checksum
How to use checksums
1d590a89a90480c35854e567ceb7c3e2907eb1c4ad3efe2785c7c692c62c4989
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.13

Release history Release notifications | RSS feed

This release

0.2.0 This release

6 release files

0.1.1

6 release files

0.1.0

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page