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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file goldenfuzz-0.1.1.tar.gz.
File metadata
- Download URL: goldenfuzz-0.1.1.tar.gz
- Upload date:
- Size: 31.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc03a87d80942c86a29899b83944c8c42fbc7625df78a320d28fc8d217bca820
|
|
| MD5 |
6cff06ecf0bf8ee09f1b856f7cc1f14e
|
|
| BLAKE2b-256 |
1b710ec2c890edae20bb64bb4b220d755ffb18710e0bfe108cb6c78002c39b4a
|
File details
Details for the file goldenfuzz-0.1.1-cp311-abi3-win_amd64.whl.
File metadata
- Download URL: goldenfuzz-0.1.1-cp311-abi3-win_amd64.whl
- Upload date:
- Size: 185.6 kB
- Tags: CPython 3.11+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52cfe2b458e025853c1b51d7c8e8adfcc0f1d2a65dd38b738d663831a12fbd93
|
|
| MD5 |
98ec71b04fd9ca6a78a5975b9e3c43be
|
|
| BLAKE2b-256 |
c94fd22c6ca10b702dcdb210e994b40739b46372d86a6695c545c5bc7c7267fb
|
File details
Details for the file goldenfuzz-0.1.1-cp311-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: goldenfuzz-0.1.1-cp311-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 313.7 kB
- Tags: CPython 3.11+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6590191e8d7ce3f58eeed8c5e5d96e23b1203223d2f82d764562271829c6a93f
|
|
| MD5 |
d580862d3e3c73938cda104c80460522
|
|
| BLAKE2b-256 |
77d2fac913a57b65ff344f30181af280e7f9ecae7b3ef0dc36b50414bed13103
|
File details
Details for the file goldenfuzz-0.1.1-cp311-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: goldenfuzz-0.1.1-cp311-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 308.0 kB
- Tags: CPython 3.11+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0b3bb2302137afa945444dd75f6ac837e8d4721fe77ed44badcf575f8bd0213
|
|
| MD5 |
aceafce18d92760741da5a2a957717d8
|
|
| BLAKE2b-256 |
d4e1e7f72ceb8cca02fb3026c35898edd8d049b51e40c81129117c14ec434327
|
File details
Details for the file goldenfuzz-0.1.1-cp311-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: goldenfuzz-0.1.1-cp311-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 281.8 kB
- Tags: CPython 3.11+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46f78993ca609b33b9a3ed5f34d504f2212b15fca44cfe16611046ac8ce4a287
|
|
| MD5 |
dd3a3b3ef121436b324b408ff8eb2998
|
|
| BLAKE2b-256 |
c3e08d376b1bdcd223f8a4758e29d23b5cc8d94dcd9b9279aabd633108526866
|
File details
Details for the file goldenfuzz-0.1.1-cp311-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: goldenfuzz-0.1.1-cp311-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 290.4 kB
- Tags: CPython 3.11+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f978ca53a81a106763826cb16ef0adf5dc9b13480c483d812a375c1a8fa69527
|
|
| MD5 |
24f4d9b592c0782dd25358901e15a831
|
|
| BLAKE2b-256 |
b59b93ebaee542dcc9204d540f323e932f32dd0bc76d0cb2d79bb392c7133feb
|