{"id":33936264,"url":"https://github.com/nkkarpov/editdistancek","last_synced_at":"2026-04-07T04:31:43.062Z","repository":{"id":52717425,"uuid":"520970101","full_name":"nkkarpov/editdistancek","owner":"nkkarpov","description":"LMS algorithm for computing edit distance with SIMD optimizations","archived":false,"fork":false,"pushed_at":"2024-03-25T03:51:12.000Z","size":19,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-18T09:45:34.677Z","etag":null,"topics":["levenshtein","levenshtein-distance","string-distance"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/editdistancek","language":"Rust","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/nkkarpov.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}},"created_at":"2022-08-03T17:18:40.000Z","updated_at":"2025-01-19T23:02:24.000Z","dependencies_parsed_at":"2024-03-25T04:47:59.439Z","dependency_job_id":null,"html_url":"https://github.com/nkkarpov/editdistancek","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"97fe6c7f40bff81f68140323aebe8a2e5cd4dc52"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nkkarpov/editdistancek","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkkarpov%2Feditdistancek","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkkarpov%2Feditdistancek/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkkarpov%2Feditdistancek/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkkarpov%2Feditdistancek/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nkkarpov","download_url":"https://codeload.github.com/nkkarpov/editdistancek/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nkkarpov%2Feditdistancek/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31500397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["levenshtein","levenshtein-distance","string-distance"],"created_at":"2025-12-12T14:09:14.950Z","updated_at":"2026-04-07T04:31:43.051Z","avatar_url":"https://github.com/nkkarpov.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# editdistancek\n\nThis library calculates the Levenshtein edit distance between two strings. The edit distance represents the minimum\nnumber of edits required to transform one string into the other.\n\nOur method is inspired by the algorithms of Ukkonen and Landau, Myers, and Schmidt. These strategies offer efficient\nways of calculating the edit distance.\n\nThe algorithm operates with a running time of O(d*min(n,m)) and O(d^2 + n) in expectation. Here, 'd' stands for the edit distance between the two\nstrings, while 'n' and 'm' denote the lengths of these strings, respectively. This efficient running time ensures the\nalgorithm remains performant even for larger strings.\n\n## Motivation\n\nThe primary objective of this library is to devise a quick solution for the bounded version of the edit distance\nproblem. Specifically, it aims to handle scenarios where, given a threshold 'k', it returns the edit distance 'd' if 'd'\nis less than or equal to 'k'. Otherwise, it indicates that the distance exceeds 'k'. This approach addresses the typical\nshortcoming of the classic edit distance algorithm, which tends to be inefficient in these cases. \n\nThe 'bounded' aspect of this library makes it particularly useful in scenarios where there's a predefined threshold of acceptable dissimilarity. This might be beneficial in time-sensitive applications or when working with very large strings, where calculating the full Levenshtein distance would be computationally prohibitive. \n\nP.S. The 'k' in editdistancek refers to the upper bound for the algorithm. In practical terms, this means that the algorithm only computes the Levenshtein edit distance up to this 'k' value.\n\n## Installation\n\nAdd to Cargo.toml\n\n```toml\n[dependecies]\neditdistancek = \"1.*\"\n```\n\n## Usage\n\n```rust\nedit_distance(\"kitten\".as_bytes(), \"sitting\".as_bytes()); // =\u003e 3\nedit_distance_bounded(\"kitten\".as_bytes(), \"sitting\".as_bytes(), 3); // =\u003e Some(3)\nedit_distance_bounded(\"kitten\".as_bytes(), \"sitting\".as_bytes(), 2); // =\u003e None\n```\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnkkarpov%2Feditdistancek","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnkkarpov%2Feditdistancek","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnkkarpov%2Feditdistancek/lists"}