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.2.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.2-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sigalike-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 51c682130cfa420b2dede1a3c4484bb851bebe018064ff6953e2ff492d71f0c4
MD5 8ee0d0f8d5a26e5f893c0195e3f3535f
BLAKE2b-256 665bb80b23f31d856f72bbf5485030a93f32179034ca110c9a77429e6cd7b8d8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sigalike-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e099dd8fa0582754ebaf97c775385f4b2212c0118899c9bcc6d3c08b385a03ee
MD5 5f3f68f90c10d9ee1ba3b1625aad1adb
BLAKE2b-256 0d7b33901556edf556785e91042604e37d9d5b2287d36b859bb435a5a9700903

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