{"id":17311197,"url":"https://github.com/guenthermi/fast_minh","last_synced_at":"2026-07-01T15:32:19.713Z","repository":{"id":234670379,"uuid":"789352032","full_name":"guenthermi/fast_minh","owner":"guenthermi","description":"Python package for fast MinHash calculation and operations","archived":false,"fork":false,"pushed_at":"2024-08-04T14:00:27.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-23T19:36:09.189Z","etag":null,"topics":["jaccard","lsh","minhash","search","similarity"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guenthermi.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,"publiccode":null,"codemeta":null}},"created_at":"2024-04-20T09:52:04.000Z","updated_at":"2024-12-23T12:26:05.000Z","dependencies_parsed_at":"2024-07-20T10:39:49.702Z","dependency_job_id":"3fd2a4e8-45d9-46be-b6b3-4b4892ec06a7","html_url":"https://github.com/guenthermi/fast_minh","commit_stats":null,"previous_names":["guenthermi/fast_minh"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/guenthermi/fast_minh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guenthermi%2Ffast_minh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guenthermi%2Ffast_minh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guenthermi%2Ffast_minh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guenthermi%2Ffast_minh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guenthermi","download_url":"https://codeload.github.com/guenthermi/fast_minh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guenthermi%2Ffast_minh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35013181,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["jaccard","lsh","minhash","search","similarity"],"created_at":"2024-10-15T12:39:47.446Z","updated_at":"2026-07-01T15:32:19.693Z","avatar_url":"https://github.com/guenthermi.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fast_minh\n\nA small Python package for calculating MinHash values, computing approaximated Jaccard similarity, and building LSH indices of MinHash values to perform fast approximated set similarity search.\n\n\u003cp align=center\u003e\n\u003ca href=\"https://pypi.org/project/fast-minh/\"\u003e\u003cimg alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/fast-minh?label=Release\u0026style=flat-square\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Installation\n\n```bash\npip install fast-minh\n```\n\n## Usage\n\n**Calculating MinHash values:**\n\nTo calculate min hash values, you can create a `HashFamily` object which initializes a set of hash fuctions (default: 128).\nAfter that you can use the `HashFamily.minh` function to obtain a set of MinHash values for a given set of strings:\n\n```python\nhf = HashFamily()\nmh = hf.minh(['test', 'it', 'out'])\n```\n\n**Calculate an approximated Jaccard coefficient:**\n\nAfter calculating multiple minhash values for different sets with the same hash family, you can use the `jaccard` function to determine and approximated similarity score:\n\n```python\nfrom fast_minh import minh, jaccard\nhf = HashFamily()\nmh1 = hf.minh(['test', 'it', 'out'])\nmh2 = hf.minh(['test', 'it', 'again'])\nsim = jaccard(mh1, mh2)\n```\n\n**MinHash LSH Index:**\n\nTo find similar sets of text values fast, you can use an MinHash LSH index.\nYou can insert sets with the `LshIndex.insert` function and retrieve similar candidates with the `LshIndex.find` method:\n\n```python\nfrom fast_minh import LshIndex\nlsh = LshIndex(1, 3)\ninput_key = 'Key'\ninput_set = ['A', 'set', 'of', 'multiple', 'tokens']\nlsh.insert(input_key, input_set)\nout = lsh.find(input_set)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguenthermi%2Ffast_minh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguenthermi%2Ffast_minh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguenthermi%2Ffast_minh/lists"}