Skip to main content

No project description provided

Project description

matchr

Fast fizzy string matching in Rust.

Algorithms:

  • Levenshtein: minimum edit distance between two strings
  • Jaro-Winkler: similarity score optimised for names and short strings
  • Trigram: character n-gram overlap, for typo detection

Usage

use matchr::{levenshtein, jaro_winkler, trigram_similarity};

fn main() {
    println!("{}", levenshtein("cat", "bat"));           // 1
    println!("{}", jaro_winkler("martha", "marhta"));    // 0.961
    println!("{}", trigram_similarity("hello", "helo")); // 0.4
}

Algorithm

Levenshtein

Counts the minimum single-character edits (insert, delete, substitute) to transform one string into another. Lower = more similar.

Jaro-Winkler

Returns a score from 0.0 (no similarity) to 1.0 (identical). Gives a bonus when strings share a common prefix - works well for names.

Trigram Similarity

Splits strings into overlapping 3-character chunks and scores overlap using the Dice coefficient. Returns 0.01.0. Good for longer strings.

Notes

  • All functions normalise input (lowercase + trim) before comparing
  • levenshtein returns usize, similarity functions return f64

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

matchr-0.1.0-cp38-abi3-win_amd64.whl (133.5 kB view details)

Uploaded CPython 3.8+Windows x86-64

matchr-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (265.3 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

matchr-0.1.0-cp38-abi3-macosx_11_0_arm64.whl (237.3 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

File details

Details for the file matchr-0.1.0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: matchr-0.1.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 133.5 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for matchr-0.1.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 8544f2a6ce45d928cb84c6130fcd1dfff38de9a5ed2af481580f11557a1d93e8
MD5 a29744c1f55fbf34f129356d36c0b4f0
BLAKE2b-256 be3c974e31bca36404724f1c848921495a68fe0c93edb607bc48e283fde03295

See more details on using hashes here.

Provenance

The following attestation bundles were made for matchr-0.1.0-cp38-abi3-win_amd64.whl:

Publisher: release.yml on mommo-codes/matchr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file matchr-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for matchr-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 948aa9cb261236ef4264cc6b0b0c6cf415e61f38e28e8f775045489461dfa255
MD5 348f1848ea018faafa3e32fa810d5bb1
BLAKE2b-256 6451c02bf15ece89e544c30a6f61d55a98a4945e6689caad95de2efd5b5de8f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for matchr-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on mommo-codes/matchr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file matchr-0.1.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for matchr-0.1.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 31cda399aad6c80ed4af7c085e08f15cedc8051992e75090cbebb481ebd0dff3
MD5 182b593a743ed98f72f9073b3fd35662
BLAKE2b-256 cfcd753c37ab49ec2b5d296a4c02e1210406abd5fa879a5710e1afe212800dc1

See more details on using hashes here.

Provenance

The following attestation bundles were made for matchr-0.1.0-cp38-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on mommo-codes/matchr

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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