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. _______________________________________________ Aspell-user mailing list [email protected] http://lists.gnu.org/mailman/listinfo/aspell-user
