aspell-user
[Top][All Lists]
Advanced

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

[Aspell-user] Using aspell to search cities


From: Scott Gifford
Subject: [Aspell-user] Using aspell to search cities
Date: Sun, 25 Sep 2005 22:36:44 -0400
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.2 (gnu/linux)

Hello,

I'm using aspell to search a list of cities.  For example, if a user
types in "phlent", I'll use aspell to suggest "Flint" for what they
really meant.  I do this by building a custom dictionary with all of
the cities in my state (Michigan), then querying it with the
Text::Aspell Perl module.

This works well for a lot of cities.  But some have prefixes and
suffixes, and sometimes people enter prefixes and suffixes that aren't
there.  In this case, Aspell doesn't find reasonable suggestions,
because the words are so far apart.  For example, if there is a city
called "West Bloomfield" and I search for "Bloomfield", Aspell doesn't
have any suggestions.  Similarly, if there is a city called "Flint"
and I search for "West Flint", Aspell doesn't have any suggestions.

Does anybody have suggestions for dealing with this in Aspell?

I've tried automatically adding prefixes and suffixes and including
Aspell's suggestions for the prefixed and suffixed words, but that
gives too many suggestions, and if I use a prefix like "North" cities
like "Northville" show up in nearly every suggestion list, which isn't
helpful.

Thanks for any ideas,

---ScottG.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]