Skip to main content

Python implementation of the Pass-join index

Project description


Python implementation of the Pass-join index.

This index allows to efficiently query similar words within a distance threshold.

The implementation is based on this paper and the existing Javascript implementation in the mnemoist package (link).



Index creation

from passjoin import Passjoin
from Levenshtein import distance  # or any string distance function

max_edit_distance = 1  # maximum edit distance for retrieval
corpus = ['pierre', 'pierr', 'jean', 'jeanne']

passjoin_index = Passjoin(corpus, max_edit_distance, distance)

Index querying

>> {'pierre', 'pierr'}

>> {'jean', 'jeanne'}

>> {'jeanne'}


Clone the project.

Install pipenv.

Run pipenv install --dev

Launch test with pipenv run pytest

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 passjoin, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size passjoin-0.0.1-py2.py3-none-any.whl (3.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size passjoin-0.0.1.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page