Detecting Misspells
So this is the easy part. It’s simply a compare of what is written against the words in the list. This portion of the code is very simple. I plan on utilizing SQL statement to identify if the word is correct. Then when you hit the space bar a period or comma the query is performed.
Synonyms, definition and the structure
The Princeton database does a wonderful job of classifying words. As I went through their literature I really learned a lot more about just the whole linguistic science. In their database each definition statement has one or more words associated to it. They have a core table of words called the sense.index which tells the developer what kind of word it is (adjective, verb, etc...) and where to get its definition. The def is found by a ref number that is used to look up in their data file the line definition that applies to it. Most words show up more than once in the sense.index file and so have many different uses/defs of the word. The synonyms then show up in the data file where each definition statement has multiple words that it applies to.
This means the application will allow you to see the definition of correctly spelled words as you type along with their synonyms and antonyms. Is it the right word for that context? Well you can know instantly. Also maybe a better word will show in the synonym list.
Word Suggestions
Ok honestly this is going to be difficult. Creating a suggestion list that is relevant and good is critical to the success of this application. I plan on utilizing a soundex utilized by the Census Bureau described in 2007 by this thread, along with Levenshtein Distance method and create a list of known typos to corrected words. I recall that MS Word 95 suggestions didn't get even close to the words that I meant. I've noticed the correct spell suggestion lists have become incredibly more accurate and are frequently correct within the first or second word on the list. So this will require lots of testing to get it right. Fortunately spelling isn't my forte. ;)
0 comments:
Post a Comment
Thank You