{"id":22683304,"url":"https://github.com/mtchavez/bk-tree-erl","last_synced_at":"2025-04-12T18:26:29.594Z","repository":{"id":7726331,"uuid":"9092442","full_name":"mtchavez/bk-tree-erl","owner":"mtchavez","description":"Erlang BK-Tree","archived":false,"fork":false,"pushed_at":"2017-04-12T04:20:24.000Z","size":20,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T12:46:54.502Z","etag":null,"topics":["bk-tree","erlang"],"latest_commit_sha":null,"homepage":null,"language":"Erlang","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/mtchavez.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-03-29T04:57:47.000Z","updated_at":"2017-04-05T13:17:04.000Z","dependencies_parsed_at":"2022-09-02T19:41:24.723Z","dependency_job_id":null,"html_url":"https://github.com/mtchavez/bk-tree-erl","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/mtchavez%2Fbk-tree-erl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtchavez%2Fbk-tree-erl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtchavez%2Fbk-tree-erl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtchavez%2Fbk-tree-erl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtchavez","download_url":"https://codeload.github.com/mtchavez/bk-tree-erl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248611976,"owners_count":21133218,"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":["bk-tree","erlang"],"created_at":"2024-12-09T21:11:35.434Z","updated_at":"2025-04-12T18:26:29.573Z","avatar_url":"https://github.com/mtchavez.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Erlang BK-Tree\n\n[![Build Status](https://travis-ci.org/mtchavez/bk-tree-erl.png?branch=master)](https://travis-ci.org/mtchavez/bk-tree-erl)\n\n## Filling tree\n\nIn the Erlang console initialize a tree with a root node\n\n```erlang\ncd(\"./src\").\nc(\"bk_trees\").\nT = bk_trees:init(\"brewery\").\n```\n\nThen add some more terms to the tree\n\n```erlang\nT2 = bk_trees:insert(\"stone\", T).\nT3 = bk_trees:insert(\"anchorsteam\", T2).\nT4 = bk_trees:insert(\"delirium\", T3).\n```\n\n## Searching\n\nOnce you have populated the tree you can do a search.\n\nDefault depth is ```1``` when doing a search.\n\n```erlang\nbk_trees:search(\"budweiser\", T4).\n% returns []\n```\n\nIncreasing the depth will give you more terms that are close to your search term.\n\n```erlang\nbk_trees:search(\"deli\", T4, 4).\n% returns [{4,\"delirium\"}]\n\nbk_trees:search(\"deli\", T4, 5).\n% returns [{5,\"stone\"},{4,\"delirium\"}]\n```\n\n## Tests\n\nRun using ```make test```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtchavez%2Fbk-tree-erl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtchavez%2Fbk-tree-erl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtchavez%2Fbk-tree-erl/lists"}