Skip to main content

fuzzy hash and distance for short strings.

Project description

fuzzyhash

experimental use at your own risks

  _____
_/ ____\_ _____________________.__.
\   __\  |  \___   /\___   <   |  |
 |  | |  |  //    /  /    / \___  |
 |__| |____//_____ \/_____ \/ ____|
                  \/      \/\/
.__                  .__
|  |__ _____    _____|  |__
|  |  \\__  \  /  ___/  |  \
|   Y  \/ __ \_\___ \|   Y  \
|___|  (____  /____  >___|  /
     \/     \/     \/     \/

fuzzy hash and distance for short strings.

In [1]: import fuzzyhash

In [2]: fuzzyhash.hamming2(fuzzyhash.simhash('obama'), fuzzyhash.simhash('barack obama'))
Out[2]: 16

In [3]: fuzzyhash.hamming2(fuzzyhash.simhash('obama'), fuzzyhash.simhash('trump'))
Out[3]: 30

In [4]: fuzzyhash.hamming2(fuzzyhash.simhash('concept'), fuzzyhash.simhash('concpet'))
Out[4]: 22

In [5]: fuzzyhash.hamming2(fuzzyhash.simhash('concept'), fuzzyhash.simhash('concept'))
Out[5]: 0

In [6]: fuzzyhash.hamming2(fuzzyhash.simhash('concept'), fuzzyhash.simhash('concept car'))
Out[6]: 11

In [7]: fuzzyhash.hamming2(fuzzyhash.simhash('concept'), fuzzyhash.simhash('quality'))
Out[7]: 30

In [8]: fuzzyhash.hamming2(fuzzyhash.simhash('quality assurance'), fuzzyhash.simhash('quality'))
Out[8]: 17

Project details


Download files

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

Files for fuzzyhash, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size fuzzyhash-0.3.0-py2.py3-none-any.whl (6.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size fuzzyhash-0.3.0.tar.gz (2.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page