局部敏感散列
项目描述
高雅
关于
该项目实现了用于索引和查询文本文档的局部敏感散列算法和数据结构。Gaoya 的主要用例是重复数据删除和集群。
- 64,32,16,8 位明哈希
- 64,128 位 simhash
- 最小哈希 | 模拟哈希
- 由 Rust 提供支持
- 多线程
>>> import gaoya
>>> index = gaoya.minhash.MinHashStringIndex(hash_size=32,
jaccard_threshold=0.5,
num_bands=42,
band_size=3,
num_hashes=42*3,
analyzer='word',
lowercase=True,
ngram_range=(1,1))
>>> corpus = [
... 'This is the first document.',
... 'This document is the second document.',
... 'And this is the third document.',
... 'Is this the first document?',
... 'This not the first nor the second nor the third, but the fourth document'
... ]
>>>
>>> for i, doc in enumerate(corpus): index.insert_document(i, doc)
...
>>> index.query('This is the first document.')
[0, 1, 2, 3]
>>>
安装
$ pip3 install gaoya
例子
参考
项目详情
下载文件
下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。
内置发行版
gaoya-0.1.2-cp37-abi3-win_amd64.whl
(386.4 kB
查看哈希)
关
gaoya -0.1.2-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl 的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | 8ae3cb1def04a6a935ad13375dfea828195ae7965e7160c2c7c0e29d17f6233f |
|
| MD5 | 573b04f8a9b22fc27408bf229236eddf |
|
| 布莱克2-256 | 5217080cd275e93db3e989282fdca63ff6fec8565a6d8440cc3a677f1e1e6b78 |
关
gaoya -0.1.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl 的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | 5b3729d712448c5060b776cd0f7b55c522ced6b04ed07e00946d4054bfcc6fa2 |
|
| MD5 | 8d31ff580d296fce64f78821d54b0ade |
|
| 布莱克2-256 | cf341321eac8141d3ccb755001fec958dfc280f76529eb2ab4cdf9bdb09cbae6 |