{"id":17925993,"url":"https://github.com/poyea/bk-tree","last_synced_at":"2026-03-10T20:02:06.241Z","repository":{"id":37031120,"uuid":"312314504","full_name":"poyea/bk-tree","owner":"poyea","description":"🌴 Header-only Burkhard-Keller tree (BK-Tree) library, with different metrics supported","archived":false,"fork":false,"pushed_at":"2025-12-26T03:59:28.000Z","size":455,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-27T12:57:34.342Z","etag":null,"topics":["bktree","cpp","cpp11","cpp14","cpp17","cpp20","data-structures","string","tree"],"latest_commit_sha":null,"homepage":"https://poyea.github.io/bk-tree/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/poyea.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null}},"created_at":"2020-11-12T15:16:31.000Z","updated_at":"2025-12-26T03:57:58.000Z","dependencies_parsed_at":"2025-06-28T22:43:43.471Z","dependency_job_id":"46256e52-5925-434d-b6b6-503ede5f2216","html_url":"https://github.com/poyea/bk-tree","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/poyea/bk-tree","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyea%2Fbk-tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyea%2Fbk-tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyea%2Fbk-tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyea%2Fbk-tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poyea","download_url":"https://codeload.github.com/poyea/bk-tree/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poyea%2Fbk-tree/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30351738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T15:55:29.454Z","status":"ssl_error","status_checked_at":"2026-03-10T15:54:58.440Z","response_time":106,"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":["bktree","cpp","cpp11","cpp14","cpp17","cpp20","data-structures","string","tree"],"created_at":"2024-10-28T20:58:38.413Z","updated_at":"2026-03-10T20:02:06.201Z","avatar_url":"https://github.com/poyea.png","language":"C++","readme":"\u003cimg align=\"left\" width=\"150\" height=\"150\" src=\"https://user-images.githubusercontent.com/24757020/150530071-e3792d5e-700b-4e50-84fe-9948b3afe8fa.png\" alt=\"Palm Tree\"\u003e\n\n# bk-tree ![CMake](https://github.com/poyea/bk-tree/workflows/CMake/badge.svg)\n\nHeader-only [Burkhard-Keller tree](https://en.wikipedia.org/wiki/BK-tree) implementation in C++, with different metrics and a few useful interfaces supported. Documentation can be found [here](https://poyea.github.io/bk-tree/).\n\n\u003cbr/\u003e\n\n## An Example\n\n```cpp\n#include \"bktree.hpp\"\n#include \u003ciostream\u003e\n\nint main() {\n  using metric_t = bk_tree::metrics::DamerauLevenshteinDistance;\n  using tree_t = bk_tree::BKTree\u003cmetric_t\u003e;\n\n  // 🌟 Initializer list syntax\n  tree_t temp{\"tall\", \"tell\", \"teel\"};\n  temp.insert(\"feel\");\n\n  tree_t tree(temp);\n\n  // 🌟 Loop like a STL container (e.g. range-based)\n  for (auto const \u0026node : tree) {\n    std::cout \u003c\u003c *node \u003c\u003c ' ';        // tall tell teel feel\n    std::cout \u003c\u003c node-\u003eword() \u003c\u003c ' '; // tall tell teel feel\n  }\n  std::cout \u003c\u003c std::endl;\n\n  std::cout \u003c\u003c \"Tree size: \" \u003c\u003c tree.size() \u003c\u003c std::endl; // Tree size: 4\n\n  // 🌟 Find all possible results\n  auto result = tree.find(\"tale\", 1);\n  for (auto \u0026p : result) {\n    std::cout \u003c\u003c p.first \u003c\u003c \" \" \u003c\u003c p.second \u003c\u003c std::endl; // tall 1\n  }\n\n  // 🌟 Erase a node by word\n  tree.erase(\"tall\");\n  result = tree.find(\"tale\", 1);\n  std::cout \u003c\u003c result.size() \u003c\u003c std::endl; // 0\n}\n```\n\n## Contributing\nSee [Contribution Guidelines](CONTRIBUTING.md).\n\n## License\nThis repository is licensed under The GNU General Public License v3.0. See also [LICENSE](LICENSE) for details.\n\n## References\n\nFred J. Damerau. 1964. A technique for computer detection and correction of spelling errors. Communications of the ACM 7, 3 (1964), 171–176. DOI:http://dx.doi.org/10.1145/363958.363994 \n\nVladimir I. Levenshtein. 1966. Binary codes capable of correcting deletions, insertions, and reversals. Soviet physics doklady 10, 8 (1966), 845-848.\n\nW.A. Burkhard and R.M. Keller. 1973. Some approaches to best-match file searching. Communications of the ACM 16, 4 (1973), 230–236. DOI:http://dx.doi.org/10.1145/362003.362025 \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoyea%2Fbk-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoyea%2Fbk-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoyea%2Fbk-tree/lists"}