Question
Hi! I would really appreciate this code in java. A sample output would be most appreciated! Thank you! 14.24 (Project: A Spelling Checker) Many popular
Hi! I would really appreciate this code in java. A sample output would be most appreciated! Thank you!
14.24 (Project: A Spelling Checker) Many popular word-processing software packages have built- in spell checkers. In this project, youre asked to develop your own spell-checker utility. We make suggestions to help get you started. You should then consider adding more capabilities. Use a com- puterized dictionary (if you have access to one) as a source of words.
Why do we type so many words with incorrect spellings? In some cases, its because we simply do not know the correct spelling, so we make a best guess. In some cases, its because we transpose two letters (e.g., defualt instead of default). Sometimes we double-type a letter accidentally (e.g., hanndy instead of handy). Sometimes we type a nearby key instead of the one we intended (e.g., biryhday instead of birthday), and so on.
Design and implement a spell-checker application in Java. Your application should maintain an array wordList of strings. Enable the user to enter these strings. [Note: In Chapter 15, we intro- duce file processing. With this capability, you can obtain the words for the spell checker from a computerized dictionary stored in a file.]
Your application should ask a user to enter a word. The application should then look up that word in the wordList array. If the word is in the array, your application should print "Word is spelled correctly." If the word is not in the array, your application should print "Word is not spelled correctly." Then your application should try to locate other words in wordList that might be the word the user intended to type. For example, you can try all possible single transposi- tions of adjacent letters to discover that the word default is a direct match to a word in wordList. Of course, this implies that your application will check all other single transpositions, such as edfault, dfeault, deafult, defalut and defautl. When you find a new word that matches one in wordList, print it in a message, such as
Did you mean "default"?
Implement other tests, such as replacing each double letter with a single letter, and any other tests you can develop to improve the value of your spell checker.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started