Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Error-tolerant text searching
Python
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
COPYING
bktest.py
fwim.py
fwim_curses.py
fwim_test.py
fwim_test_slow.py
list of countries.txt
readme.txt

readme.txt

Find What I mean
by Rick Dangerous


Overview

This library intends to find matches in a list of words when there are
spelling errors.

Take a list of three words:

printf
hello
world.

A search for "hallo" gives no matches in SQL or other systems. But
"hello" is probably what the user meant, so that should be returned.

If the list is this:

héllo
hallo
hullo

Then the search "hello" probably means "héllo" as missing accents are
common.

If the list is this:

hello
hella
hellq

Then the search "hellp" probably means "hello", since o and p are very
close in the keyboard, it is the most probable typo.

And so on and so on.


Test application

Run './fwim_curses.py "list of countries.txt"'.

It searches the list of countries for you. Things to try:

ger (easy, Germany at the top)
brab (finds Brazil and Barbados, as you would expect)
kirgistan (sound-alike to Kyrgyzstan)
francais (its kinda like France)
Something went wrong with that request. Please try again.