Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuici authored Jun 8, 2023
1 parent 63d5d6d commit bd6a851
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# HNSW4Hashes

HNSW4Hashes is a specialized implementation of the HNSW (Hierarchical Navigable Small World) data structured adapted for efficient nearest neighbor search of fuzzy hashes.
HNSW4Hashes is a specialized implementation of the HNSW (Hierarchical Navigable Small World) data structured adapted for efficient nearest neighbor search of approximate matching hashes.

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)

Expand Down Expand Up @@ -29,7 +29,7 @@ from tlsh_algorithm import TLSHHashAlgorithm
# Create an HNSW structure
myHNSW = HNSW(M=4, ef=4, Mmax=8, Mmax0=16)

# Create the nodes based on TLSH Fuzzy Hashes
# Create the nodes based on TLSH approximate matching hashes
node1 = HashNode("T12B81E2134758C0E3CA097B381202C62AC793B46686CD9E2E8F9190EC89C537B5E7AF4C", TLSHHashAlgorithm)
node2 = HashNode("T10381E956C26225F2DAD9D5C2C5C1A337FAF3708A25012B8A1EACDAC00B37D557E0E714", TLSHHashAlgorithm)
node3 = HashNode("T1DF8174A9C2A506F9C6FFC292D6816333FEF1B845C419121A0F91CF5359B5B21FA3A304", TLSHHashAlgorithm)
Expand All @@ -39,7 +39,7 @@ myHNSW.add_node(node1)
myHNSW.add_node(node2)
myHNSW.add_node(node3)

# Perform k-nearest neighbor search based on TLSH fuzzy hash similarity
# Perform k-nearest neighbor search based on TLSH approximate matching hashes
query_node = myHNSW.add_node(HashNode("T1BF81A292E336D1F68224D4A4C751A2B3BB353CA9C2103BA69FA4C7908761B50F22E301", TLSHHashAlgorithm))
results = myHNSW.knn_search(query_node, k=5)

Expand All @@ -54,4 +54,4 @@ myHNSW = HNSW.load("myHNSW.txt")
```

## License
GNU General Public License v3.0
GNU General Public License v3.0

0 comments on commit bd6a851

Please sign in to comment.