Skip to main content

Fast string similarity algorithms in Rust

Project description

marhta

License

Fast string similarity algorithms

This library is still in development and may not be stable.

Installation

pip install marhta

Usage

from marhta import levenshtein_similarity, jaro_winkler_similarity

# Calculate string similarities
print(levenshtein_similarity("hello", "helo"))  # 0.8
print(jaro_winkler_similarity("martha", "marhta"))  # 0.961

# Find best matches
from marhta import levenshtein_match
strings = ["apple", "banana", "orange", "pear"]
matches = levenshtein_match("aple", strings)
print(matches)  # [("apple", 0.8), ("pear", 0.5)]

Features

  • Levenshtein distance and similarity measures
  • Jaro-Winkler distance and similarity measures
  • Fuzzy string matching with customizable thresholds

Performance

Written in Rust for improved performance, while maintaining a Pythonic API.

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 Distribution

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

marhta-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl (249.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

File details

Details for the file marhta-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for marhta-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2c91dc9fa5967da497bcf5696cb3351a6a1ab7fcf2c80ee16c92004693930193
MD5 a78b7918795bc53b59c7904e13dd7144
BLAKE2b-256 8b27110a88a72add0f653a8c8cb54e4984464be0e7fa714c869fb5d7ea79a304

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 Pingdom Monitoring Sentry Error logging StatusPage Status page