Skip to content

Instantly share code, notes, and snippets.

View chriskaukis's full-sized avatar

Chris chriskaukis

View GitHub Profile
@chriskaukis
chriskaukis / simple_fuzzy_search.py
Created June 23, 2015 16:08
Super Simple Fuzzy Search
def is_fuzzy_match(text, query):
# Location of last match.
# Initialize to -1 since no match yet.
# -1 also works well for our usage.
l = -1
t = text.lower()
q = query.lower()
# Iterate over each character in the query.
for c in q:
if c == ' ':