Skip to main content

No project description provided

Project description

https://github.com/tjsanti/sigalike/blob/main/assets/sigalike.jpeg?raw=true

Python compat PyPi GHA Status Coverage Documentation Status

sigalike

sigalike is a Python module that provides a simple and efficient way to calculate the shifted sigmoid similarity score between two strings. The shifted sigmoid similarity score acts as a fuzzy string matching metric, allowing for the comparison of strings with varying levels of similarity.

The module provides two main functions: shifted_sigmoid_similarity and best_match. The shifted_sigmoid_similarity function calculates the shifted sigmoid similarity score between two input strings, while the best_match function returns the best match(es) between two collections or a string and a collection based on the shifted sigmoid similarity score.

The module includes basic built-in preprocessing for the input strings, which removes punctuation and converts all characters to lowercase. This preprocessing step helps to improve the accuracy of the similarity score.

Overall, sigalike is a lightweight and easy-to-use tool for fuzzy string matching in Python. It can be useful in various applications, such as text classification, search engines, and data cleaning.

Installation

sigalike requires Python >=3.9 and can be installed via:

pip install sigalike

Usage

from sigalike import shifted_sigmoid_similarity, best_match

shifted_sigmoid_similarity("make up", "make up make up")  # 1.0
shifted_sigmoid_similarity("lazy dog", "the quick brown fox jumps over the lazy dog", shift=8)  # 0.8807970779778824

best_match("hello world", ["hello world", "goodbye world"])  # BestMatch(match='hello world', score=1.0)
best_match(
    "hello world", ["goodbye world", "hi mom", "tell the world I said hello"], shift=2
)  # BestMatch(match='goodbye world', score=0.2310585786300049)

Project details


Download files

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

Source Distribution

sigalike-1.0.4.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

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

sigalike-1.0.4-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file sigalike-1.0.4.tar.gz.

File metadata

  • Download URL: sigalike-1.0.4.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.8.2 Darwin/24.0.0

File hashes

Hashes for sigalike-1.0.4.tar.gz
Algorithm Hash digest
SHA256 5f4db8f0c8b8c4828e2d2b24820c317ace7aaa5442bca963bab5a3f37923a672
MD5 0cb3f2a97c5f9d43e6a85a60a65427cd
BLAKE2b-256 d08553222407cfddc0d8447a6c819760403b138cc6b9d87328179d81560ba101

See more details on using hashes here.

File details

Details for the file sigalike-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: sigalike-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.8.2 Darwin/24.0.0

File hashes

Hashes for sigalike-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6d372c1d630401779ee3bf7a6387fee055d58e66be2f496e23b0394a2b821365
MD5 e9874423c3c81cefe1d5f0ec1177cc0f
BLAKE2b-256 40504e4eb4880f2ea6f324f8f590742cd9e57c7bc80e3d3705da1f2d1b55f226

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