-
-
Save guilleJB/6163650 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fuzzywuzzy import process | |
from fuzzywuzzy.utils import full_process | |
def processor(choice): | |
return full_process(choice['name']) | |
res = process.extractOne(poblacio, poblacions_list, processor) | |
if not res: | |
print "Població no trobada: %s" % poblacio | |
continue | |
if res[1] >= 95: | |
msg = "%s => %s (%s)" % (poblacio, res[0], res[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment