Skip to main content

Original, standard and customisable versions of the Jaro-Winkler functions.

Project description

JaroWinkler

PyPI version

Original, standard and customisable versions of the Jaro-Winkler functions.

>>> import jaro
>>> jaro.jaro_winkler_metric(u'SHACKLEFORD', u'SHACKELFORD')
0.9818181
>>> help(jaro)

Help on package jaro:

NAME
    jaro - Python translation of the original Jaro-Winkler functions.

DESCRIPTION
    The Jaro-Winkler functions compare two strings and return a score indicating
    how closely the strings match. The score ranges from 0 (no match) to 1
    (perfect match).

    Two null strings ('') will compare as equal. Strings should be unicode
    strings, and will be compared as given; the caller is responsible for
    capitalisations and trimming leading/trailing spaces.

    You should normally only need to use either the jaro_metric() or
    jaro_winkler_metric() functions defined here. If you want to implement your
    own, non-standard metrics, look at the comments and functions in the jaro.py
    submodule.

PACKAGE CONTENTS
   ...
   jaro
   strcmp95
   ...

FUNCTIONS
    jaro_metric(string1, string2)
        The standard, basic Jaro string metric.

    jaro_winkler_metric(string1, string2)
        The Jaro metric adjusted with Winkler's modification, which boosts
        the metric for strings whose prefixes match.

    original_metric(string1, string2)
        The same metric that would be returned from the reference Jaro-Winkler
        C code, taking as it does into account a typo table and adjustments for
        longer strings.
        ...

    custom_metric(string1, string2, typo_table, typo_scale,
                               boost_threshold, pre_len, pre_scale, longer_prob)
        Calculate the Jaro-Winkler metric with parameters of your own choosing.
        ...

Project details


Download files

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

Source Distribution

jaro_winkler-2.0.0.tar.gz (30.2 kB view details)

Uploaded Source

Built Distribution

jaro_winkler-2.0.0-py3-none-any.whl (33.6 kB view details)

Uploaded Python 3

File details

Details for the file jaro_winkler-2.0.0.tar.gz.

File metadata

  • Download URL: jaro_winkler-2.0.0.tar.gz
  • Upload date:
  • Size: 30.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.8

File hashes

Hashes for jaro_winkler-2.0.0.tar.gz
Algorithm Hash digest
SHA256 80cd78d806ded192f86481283077973d0164243fc52b455d145350b6b04be018
MD5 4db5468fc7a2b36177227d082258d219
BLAKE2b-256 8e40394c9b59cc5725e8353a4bf2d44b5911bc7bfc037b549463e2a1d1ce15e9

See more details on using hashes here.

File details

Details for the file jaro_winkler-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: jaro_winkler-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 33.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.8

File hashes

Hashes for jaro_winkler-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f9942f2d394f8bacf5ea515ff260cf974b23a0fd5d14d6e8b4364074655bb42
MD5 93dc748031ead8655bee3a507f5ea197
BLAKE2b-256 e1d0d5bf8e215501e6270292c101bf3d9736b26b0121c7a56640258605c3421f

See more details on using hashes here.

Supported by

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