{"id":24941415,"url":"https://github.com/marcelm/tinyalign","last_synced_at":"2026-01-07T14:10:54.805Z","repository":{"id":56084395,"uuid":"193772103","full_name":"marcelm/tinyalign","owner":"marcelm","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-06T14:28:58.000Z","size":35,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-03T20:51:25.274Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Cython","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcelm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-25T19:38:40.000Z","updated_at":"2023-07-03T15:07:15.000Z","dependencies_parsed_at":"2025-02-02T18:37:20.550Z","dependency_job_id":null,"html_url":"https://github.com/marcelm/tinyalign","commit_stats":null,"previous_names":["marcelm/alignlib"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelm%2Ftinyalign","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelm%2Ftinyalign/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelm%2Ftinyalign/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelm%2Ftinyalign/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcelm","download_url":"https://codeload.github.com/marcelm/tinyalign/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246072229,"owners_count":20719279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-02T18:22:49.943Z","updated_at":"2026-01-07T14:10:54.776Z","avatar_url":"https://github.com/marcelm.png","language":"Cython","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/marcelm/tinyalign/actions/workflows/ci.yml/badge.svg)](https://github.com/marcelm/tinyalign/actions/workflows/ci.yml)\n[![PyPI](https://img.shields.io/pypi/v/tinyalign.svg?branch=main)](https://pypi.python.org/pypi/tinyalign)\n\n\n# tinyalign\n\nA small Python module providing edit distance (aka Levenshtein distance, that\nis, counting insertions, deletions and substitutions) and Hamming distance\ncomputation.\n\nIts main purpose is to speed up computation of edit distance by\nallowing to specify a maximum number of differences `maxdiff` (banding). If\nthat parameter is provided, the returned edit distance is anly accurate up to\n`maxdiff`. That is, if the actual edit distance is higher than `maxdiff`, a\nvalue larger than `maxdiff` is returned, but not necessarily the actual edit\ndistance.\n\nFor computing regular edit distances or if your *maxdiff* is less than 4, you\nshould prefer [https://github.com/fujimotos/polyleven](polyleven), as that is\nfaster in that case. When `maxdiff` is 4 or more, but not too close to the\nlength of the shortest string, this module is faster.\n\n```\n\u003e\u003e\u003e from tinyalign import edit_distance, hamming_distance\n\u003e\u003e\u003e edit_distance(\"banana\", \"ananas\")\n2\n\u003e\u003e\u003e hamming_distance(\"hello\", \"yello\")\n1\n\u003e\u003e\u003e edit_distance(\"hello\", \"world\", maxdiff=2)\n3\n```\n\n\n## Changes\n\n### v0.2.2\n\n* Added type hints\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelm%2Ftinyalign","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcelm%2Ftinyalign","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelm%2Ftinyalign/lists"}