Re: suggestion algorithm
Kevin Atkinson <[email protected]>
| Newsgroups | gmane.comp.gnu.aspell.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 19 Oct 2005, Karl Chen wrote: > Hi, I find for some words aspell makes uncharacteristically bad > suggestions. > > I typed "decipehr". The top 20 suggestions (alphabetically): > .... > > I think "decipher" , a one-character transposition (edit distance > of 1) should be a better suggestion than any of these 20, but at > least in the top 10. "Decipjer" has the same problem. Off hand I do not know. I will have to investigate. It could be a bug as Aspell should generally return all words with an edit distance of 1. The soundslike for the two words could be very different. If you want to investigate for yourself you can uncomment the two lines //#include "iostream.hpp" //#define DEBUG_SUGGEST and then recompile aspell. This will spew a lot of debugging info out. You can than use "aspell -a" and type in the word of question. > For some typos like "decioher" and "decopher", aspell suggests > perfectly. Is it an issue of an incomplete keyboard definition? > 'h' and 'j' are right next to each other, but regardless, > replacements by letters not next to each other should be offered > as suggestions anyway. No it is not an issue with the keyboard definition. That only effects the order of the suggestions returned, not which suggestions are returned.