One thing you can do is store a word profile in your database, which is a string of all of the letters in the word in alphabetical order. So the word profile for 'apple' is 'aelpp'. Then you can just include all of the words that match the profiles of the real words. For example, 'quiet' and 'quite' both have the profile 'eiqtu'.