minhash
Nim implementation of minhash algoritim
Summary
| Latest Version | 0.1.0 |
|---|---|
| License | MIT |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-07-27 04:32 |
Tags
Authors
- zhoupeng
Installation
nimble install minhash
choosenim install minhash
git clone https://github.com/bung87/minhash
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| minhash | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Dependencies
| Package | Version | Optional |
|---|---|---|
| nim >= | 1.6.0 | No |
Source
| Repository | https://github.com/bung87/minhash |
|---|---|
| Homepage | https://github.com/bung87/minhash |
| Registry Source | nimble_official |
README
minhash
Nim implementation of the MinHash algorithm with Locality Sensitive Hashing (LSH) for near-duplicate detection.
Ported from mattilyra/LSH.
Requirements
- Nim >= 1.6.0
Installation
nimble install minhash
Usage
import minhash
let hasher = initMinHasher[uint64](100)
var lsh = initLocalitySensitive[uint64](hasher, num_bands = 10)
lsh.add("This is a simple document", "doc1")
lsh.add("This is another document", "doc2")
# Find all duplicate pairs above a Jaccard threshold
let dupes = lsh.getDuplicates(min_jaccard = 0.5)
for d in dupes:
echo d.a, " ~ ", d.b
# Find duplicates of a specific document
let similar = lsh.getDuplicatesOf(doc = "This is a simple document")
Running Tests
nimble test
License
MIT