November 2018
Beginner to intermediate
182 pages
4h 48m
English
Let's see how we can use FuzzyWuzzy to correct our misspellings.
Use the following code to install FuzzyWuzzy on your machine:
import sys!{sys.executable} -m pip install fuzzywuzzy# alternative for 4-10x faster computation: # !{sys.executable} -m pip install fuzzywuzzy[speedup]
FuzzyWuzzy has two main modules that will come in useful: fuzz and process. Let's import fuzz first:
from fuzzywuzzy import fuzz# Trying the ratio and partial_ratio fuzz.ratio("Electronic City Phase One", "Electronic City Phase One, Bangalore")# 82fuzz.partial_ratio("Electronic City Phase One", "Electronic City Phase One, Bangalore")# 100
We can see how the ratio function is confused by the trailing Bangalore used in the preceding address, but really the ...
Read now
Unlock full access