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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

goldenfuzz-0.2.0.tar.gz (33.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

goldenfuzz-0.2.0-cp311-abi3-win_amd64.whl (182.5 kB view details)

Uploaded CPython 3.11+Windows x86-64

goldenfuzz-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl (315.5 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ x86-64

goldenfuzz-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl (310.6 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ ARM64

goldenfuzz-0.2.0-cp311-abi3-macosx_11_0_arm64.whl (283.4 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

goldenfuzz-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl (287.8 kB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

Details for the file goldenfuzz-0.2.0.tar.gz.

File metadata

  • Download URL: goldenfuzz-0.2.0.tar.gz
  • Upload date:
  • Size: 33.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for goldenfuzz-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6988af3a476036350f7399f284a2aac478ab44f887c820374b99e04a467dfe75
MD5 055822e6c252030781087cebd7ed58cc
BLAKE2b-256 6df6e5d3303b6efbed04b5b401e2f901611ae541ae3aff962bd46bf31c7c4578

See more details on using hashes here.

File details

Details for the file goldenfuzz-0.2.0-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: goldenfuzz-0.2.0-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 182.5 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

Hashes for goldenfuzz-0.2.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 6b33d9e4c260d71e9e985c4a47cd71d2e972ff3e79f1b76da9e1487de84716a5
MD5 94d83d4b041de430b27b9c5acd2b9468
BLAKE2b-256 f4379145ae69912021a361e54472db6bc9bf4707160ac7647c40c31d8153fd64

See more details on using hashes here.

File details

Details for the file goldenfuzz-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for goldenfuzz-0.2.0-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2cb49218e3b2ea15d4a25859186384ae860dc975d24315574b112475a885d609
MD5 c038cefeacb9fb3b466e98d8e7b3038e
BLAKE2b-256 8a3957b19a51541542d53565933dbc723529849d423ec83a0329d86bedbef5b7

See more details on using hashes here.

File details

Details for the file goldenfuzz-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for goldenfuzz-0.2.0-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7145a2ee951f6991b2f32ef0a351a265525b05caaaab1c6dfa192ceb64a83f6c
MD5 a3417eec82d5981f105a986261ae243e
BLAKE2b-256 25d57d7c306bafb15689300f8222571d6b9e93d9776bd5f0b64607ab38947668

See more details on using hashes here.

File details

Details for the file goldenfuzz-0.2.0-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for goldenfuzz-0.2.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 84901743357a80dd5401607996283752926720275c52655f09f7d743d1200cef
MD5 055957550b7fc1f47f08dc04d247629c
BLAKE2b-256 1ba83ee24d82063f276a74cead9e23c3be9846d36cbda85c7a554e5d344a44d0

See more details on using hashes here.

File details

Details for the file goldenfuzz-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for goldenfuzz-0.2.0-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2a299e0b5037171efa26604b9bd0de5f1ee7c96ceb9966b7983407efa1431a40
MD5 c72b8bc242acc64b44baf11479b41fdb
BLAKE2b-256 1d590a89a90480c35854e567ceb7c3e2907eb1c4ad3efe2785c7c692c62c4989

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page