{"id":19305132,"url":"https://github.com/erikerlandson/edit_distance","last_synced_at":"2025-04-22T12:34:19.476Z","repository":{"id":8818768,"uuid":"10517547","full_name":"erikerlandson/edit_distance","owner":"erikerlandson","description":"STL and Boost compatible edit distance functions for C++","archived":false,"fork":false,"pushed_at":"2014-04-14T22:08:16.000Z","size":948,"stargazers_count":11,"open_issues_count":5,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-06-11T20:19:18.660Z","etag":null,"topics":["algorithm","algorithms","c-plus-plus","edit-distance","levenshtein","levenshtein-distance","numeric","stl"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erikerlandson.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}},"created_at":"2013-06-06T02:46:22.000Z","updated_at":"2023-10-06T12:56:50.000Z","dependencies_parsed_at":"2022-09-24T05:10:36.211Z","dependency_job_id":null,"html_url":"https://github.com/erikerlandson/edit_distance","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikerlandson%2Fedit_distance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikerlandson%2Fedit_distance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikerlandson%2Fedit_distance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erikerlandson%2Fedit_distance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erikerlandson","download_url":"https://codeload.github.com/erikerlandson/edit_distance/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223896605,"owners_count":17221448,"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":["algorithm","algorithms","c-plus-plus","edit-distance","levenshtein","levenshtein-distance","numeric","stl"],"created_at":"2024-11-09T23:33:41.989Z","updated_at":"2024-11-09T23:33:42.475Z","avatar_url":"https://github.com/erikerlandson.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Note: I am currently doing development for edit_distance() on my fork of Boost.Algorithm:\n* https://github.com/erikerlandson/algorithm/tree/edit_distance\n* https://github.com/erikerlandson/algorithm/tree/order_np_alg\n* http://erikerlandson.github.io/algorithm/libs/algorithm/doc/html/algorithm/Sequence.html\n\n\nedit_distance\n=============\n\nA C++ Boost implementation of the edit distance between two sequences -- aka Levenshtein distance, aka string distance, aka string difference.\n\nThe edit_distance library provides a function edit_distance():\n* edit_distance(seq1, seq2) returns the edit distance between two sequences, which may be any C++ range.\n* edit_distance(seq1, seq2, _script = out) returns the edit distance, and calls special handler methods from object 'out' on the correspondiung \"script\" of edit operations.\n\nThese functions are based on a variation of the Dijkstra Single Source Shortest Path algorithm, optimized for the particular structure of an edit graph.  They are efficient on long sequences with localized areas of differences (e.g. computing the diff of two similar files).  Whenever conditions permit, an even faster specialized distance algorithm is automatically applied:\n    An O(ND) Difference Algorithm and its Variations\n    by Eugene W. Myers\n    Dept of Computer Science, University of Arizona\n\nA user specified edit operation cost function can be provided:\n\n    // provide a customized cost for insertion, deletion and/or substitution\n    int d = edit_distance(s1, s2, _cost=my_cost_type());\n\n    // use a customized definition of element equality:\n    int d = edit_distance(s1, s2, _equal=my_equal());\n\nSequences may be any kind of C++ range object, and may be mixed:\n\n    // Any forward range can be provided to these functions.\n    // Sequence element types are not required to be exactly equal, as long as they are compatible.\n    int d = edit_distance(my_vector, my_list | boost::adaptors::reversed);\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikerlandson%2Fedit_distance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferikerlandson%2Fedit_distance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferikerlandson%2Fedit_distance/lists"}