Skip to main content

No project description provided

Project description

assets/logo_200w.png

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.

Features

Installation

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

pip install sigalike

Usage

from sigalike.similarity import shifted_sigmoid_similarity, best_match

shifted_sigmoid_similarity("hello world", "hello world")  # 1.0
shifted_sigmoid_similarity("hello world", "hello world", shift=4)  # 1.0
shifted_sigmoid_similarity("hello world", "hello world", shift=8)  # 0.9504118552868653

best_match("hello world", ["hello world", "goodbye world"])  # BestMatch(match='hello world', score=1.0)
best_match("hello world", ["hello world", "goodbye world"], shift=4)  # BestMatch(match='hello world', score=1.0)
best_match(
    "hello world", ["hello world", "goodbye world"], shift=8
)  # BestMatch(match='hello world', score=0.9504118552868653)

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.0.tar.gz (9.1 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.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sigalike-1.0.0.tar.gz
  • Upload date:
  • Size: 9.1 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.0.tar.gz
Algorithm Hash digest
SHA256 53aa421a3968cc63990b0cc5d1aa1473fa72dfe068f9973a91747f7a5d182979
MD5 1122a979cee1d861504400b0319bd97a
BLAKE2b-256 a2fd77288ac67deaeacd88779da32648894deac1ed8964b8d7773948db9a26a6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sigalike-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c592c6ba4b1efb14c5f103d55d0364ddd7e542876ec392c404849f1b60a8fe4e
MD5 032e9ad91363aa6d68ce9d533946cb84
BLAKE2b-256 0e529095793014a9c20c84d4d5e6680a43ab0c60b92dbd3d9fa81ed281a63359

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