Skip to main content

Fast fuzzy text search

Project description

Narrow Down - Efficient near-duplicate search

PyPI - Version PyPI - Python Version Tests Codecov License

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Black pre-commit Contributor Covenant

Narrow Down offers a flexible but easy-to-use Python API to finding duplicates or similar documents also in very large datasets. It reduces the O(n²) problem of comparing all strings with each other to linear scale by using approximation algorithms like Locality Sensitive Hashing.

Status: Prototype. Solid and fast production quality, but API changes are still possible until version 1.0 is reached.

Features

  • Document indexing and search based on the Minhash LSH algorithm
  • High performance thanks to a native extension module in Rust
  • Easy-to-use API with automated parameter tuning
  • Works with exchangeable storage backends. Currently implemented:
    • In-Memory
    • Cassandra / ScyllaDB
    • SQLite
    • User defined backends (by implementing a small interface)
  • Native asyncio interface

Installation

The Python package can be installed with pip:

pip install narrow-down

Extras

Some of the heavier functionality is available as extra:

pip install narrow-down[scylladb]   # Cassandra / ScyllaDB storage backend

Similar projects

  • pylsh offers a good implementation of the classic Minhash LSH scheme in Python and Cython. If you only need this and you don't need a database backend it can be a good choice.
  • Datasketch implements an interesting collection of different data sketching algorithms for similarity matching, cardinality estimation and k-nearest-neighbour search. The implementation is not highly optimized but very well usable, the documentation rich and multiple database backends can be used for some of the sketches
  • Milvus offers a full database stack for vector search, a different approach for fast searching. It can also be applied to text search when an emedding like Word2Vec or Bert is used to vectorize the text.

Credits

This package was created with Cookiecutter and the fedejaure/cookiecutter-modern-pypackage project template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

narrow_down-0.8.0-cp37-abi3-win_amd64.whl (231.6 kB view details)

Uploaded CPython 3.7+Windows x86-64

narrow_down-0.8.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.17+ x86-64

narrow_down-0.8.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (648.1 kB view details)

Uploaded CPython 3.7+macOS 10.9+ universal2 (ARM64, x86-64)macOS 10.9+ x86-64macOS 11.0+ ARM64

File details

Details for the file narrow_down-0.8.0-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for narrow_down-0.8.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 aa6772645a9070a15f7741ecd80eabf31277bba947144c651ebc9b6f1f9eb13e
MD5 cb043b6f146dfdb0e17081dab0b64fd1
BLAKE2b-256 71c01e14dbc640554f764d5f05df0dd3f669ce1fd4f880baaa001bce877ded8a

See more details on using hashes here.

File details

Details for the file narrow_down-0.8.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for narrow_down-0.8.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fa7cfbd870113479866b6d4bbb297a5f148977e6763e3ac76e594970cee6d748
MD5 a8a9040b1e0df950d0cc03daf3ad8f3e
BLAKE2b-256 48b777b58f72c9d7ced727afa91e3b1c5dcef72b1f1a15fcb80109f3966668d7

See more details on using hashes here.

File details

Details for the file narrow_down-0.8.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for narrow_down-0.8.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 67eb7c6675aba1a7f08d9c3b07cb01fa623dff4590658d5a330a4229ee60ba4e
MD5 d5bd90cc3c5b2c962a0c6879f8bbca0d
BLAKE2b-256 fc862eea515eeb4084ce80915f1323fc0bd970b47b4b1fbe927a94b68c5ba142

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page