Skip to content
This repository was archived by the owner on Aug 26, 2024. It is now read-only.

Installing python-Levenshtein as suggested by the warnings gives different results. #318

Description

@JeremyThiesen

I was running this code:

from fuzzywuzzy import fuzz
partial_ratio = fuzz.partial_ratio('more than fifty', 'i know that because a lion run fifty mile per hour and a cheetah run about eighty mile per hour and sixty-five be more than fifty and be slow than eighty')
print (partial_ratio)

At fuzzywuzzy version 0.18.0, it gives the answer of 100. It also gives the following user warning.

UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
  warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')

Installing python-Levenshtein at version 0.12.2, then gives the result answer of 87 for the preceeding code block, which is incorrect since there is an exact match.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions