{"id":18258705,"url":"https://github.com/maaarcocr/closestmatch-rs","last_synced_at":"2025-04-04T19:31:55.700Z","repository":{"id":57606016,"uuid":"87725192","full_name":"Maaarcocr/closestmatch-rs","owner":"Maaarcocr","description":"This library fuzzy matches an input string to a list of target strings.","archived":false,"fork":false,"pushed_at":"2017-04-10T11:41:36.000Z","size":5799,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-20T17:13:31.184Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Maaarcocr.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":"2017-04-09T17:10:48.000Z","updated_at":"2025-01-29T23:38:21.000Z","dependencies_parsed_at":"2022-09-26T20:01:59.672Z","dependency_job_id":null,"html_url":"https://github.com/Maaarcocr/closestmatch-rs","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/Maaarcocr%2Fclosestmatch-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maaarcocr%2Fclosestmatch-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maaarcocr%2Fclosestmatch-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Maaarcocr%2Fclosestmatch-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Maaarcocr","download_url":"https://codeload.github.com/Maaarcocr/closestmatch-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247237680,"owners_count":20906329,"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":"2024-11-05T10:34:01.923Z","updated_at":"2025-04-04T19:31:50.680Z","avatar_url":"https://github.com/Maaarcocr.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/Maaarcocr/closestmatch-rs.svg?branch=master)](https://travis-ci.org/Maaarcocr/closestmatch-rs)\n# closestmatch-rs\nThis library fuzzy matches an input string to a list of target strings.\n\n## Why this library\nLet's say that you have a collections of words, call it a dictionary of known words, such as [\"hello\",\"good\",\"rust\"]. You also have a word, such as \"hllo\" and you want to find the closest match from the dictionary. This is the main functionality of this library.\n\n## How it works\nThe library is based on the concept of bags of words and it calculate the similarity splitting strings in substrings.\nThe developer using this library can specify how long the bags of words are.\n\n## Documentation\nYou can find the documentation [here](https://maaarcocr.github.io/closestmatch-rs/)\n\n## Example\n\n```rust\nlet known_words = [\"hello\".to_string(), \"rust\".to_string(), \"hello world\".to_string()].to_vec();\n//The second parameter specify that strings will be splitted in bags of words of length 2 and 3.\nlet cm = ClosestMatch::new(known_words,[2, 3].to_vec());\nlet closest = cm.get_closest(\"hlo\".to_string());\nprintln!(\"{}\", closest)\n```\n\nThis will print ```Some(\"hello\")```.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaaarcocr%2Fclosestmatch-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaaarcocr%2Fclosestmatch-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaaarcocr%2Fclosestmatch-rs/lists"}