Insert a unique key to the index, together with a MinHash (or weighted MinHash) of the set referenced by the key. Args: key (hashable): The unique identifier of the set. minhash (datasketch.MinHash): The MinHash of the set.
(self, key, minhash, check_duplication=True)
| 366 | hashtable.empty_buffer() |
| 367 | |
| 368 | def insert(self, key, minhash, check_duplication=True): |
| 369 | ''' |
| 370 | Insert a unique key to the index, together |
| 371 | with a MinHash (or weighted MinHash) of the set referenced by |
| 372 | the key. |
| 373 | |
| 374 | Args: |
| 375 | key (hashable): The unique identifier of the set. |
| 376 | minhash (datasketch.MinHash): The MinHash of the set. |
| 377 | ''' |
| 378 | self.lsh._insert(key, minhash, check_duplication=check_duplication, |
| 379 | buffer=True) |