- Aug 28, 2003
- 4,084
- 17
- 81
thanks for the help in the previous thread. I'm using the Metaphone algorithm, and my spell check app is coming along pretty well.
I have another problem.
Let's say I misspell impractical as impratical.
The metaphone codes are:
impractical - IMPRKTKL
impratical - IMPRTKL
What I had been doing was finding the metaphone code for the misspelled word and searching for matches. If none found, I would take the first x - n characters and try to find a match.
So I would look for:
IMPRTKL* then
IMPRTK* then
IMPRT* etc... until I found some matches.
The problem is that the misspelling is in the middle of the word and it is a consonant - I would have to go all the way down to IMPR* which gives me a list of hundreds and hundreds of matches.
Other mid-word misspellings aren't a big issue because they don't change the sound of the word.
Someone mentioned in the other thread a mehtod of calculating the shortest path of changes from incorrect to correct word.
how does that work?
thanks for your help!
I have another problem.
Let's say I misspell impractical as impratical.
The metaphone codes are:
impractical - IMPRKTKL
impratical - IMPRTKL
What I had been doing was finding the metaphone code for the misspelled word and searching for matches. If none found, I would take the first x - n characters and try to find a match.
So I would look for:
IMPRTKL* then
IMPRTK* then
IMPRT* etc... until I found some matches.
The problem is that the misspelling is in the middle of the word and it is a consonant - I would have to go all the way down to IMPR* which gives me a list of hundreds and hundreds of matches.
Other mid-word misspellings aren't a big issue because they don't change the sound of the word.
Someone mentioned in the other thread a mehtod of calculating the shortest path of changes from incorrect to correct word.
how does that work?
thanks for your help!
