Re: [Tracker] [t-s-t] Tracker Suggests



2007/3/4, Edward Duffy <eduffy gmail com>:
Hey --

Here's a patch I put together this morning that will suggest an
alternate search term if the user's search returns nothing.  It uses
the Levenshtein distance algorithm[1] to compare a search term with
the list of words indexed by qdbm, and suggests the closest match.

If there's enthusiasm for this, this could easily be extended to
return top 5 or 10 or whatever, and have a widget in libtracker-gtk
that acts like the Google Suggests bar in Firefox.

...and a screenshot for those you want to see it without applying the patch:

    http://img260.imageshack.us/my.php?image=suggestxs8.png
(the "galerkin" is a GtkButton, when clicked to search with the suggestion).

[1] http://en.wikipedia.org/wiki/Levenshtein_distance


Levenstein distance is also how  Lucene does fuzzy searches. Maybe your code can be used to implement this generally?

The reason I ask is because the Wasabi spec[1] has fuzzy searches as an extension to the base query language it would be great if tracker could support that :-)

Cheers,
Mikkel

[1]: http://wiki.freedesktop.org/wiki/WasabiQueryLanguage



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]