Implement a spell checker by using the hash table with quadratic probing. Given a document your program should output all of the misspelled words. For each misspelled word you should also provide a list of candidate corrections from the dictionary that can be formed by applying one of the following rules to the misspelled word:

  • Adding one character in each possible position
  • Removing one character from the word
  • Swapping adjacent characters in the word

Your program should run as follows:

spellcheck document file dictionary file

You will be provided with a small document named turing.txt and a dictionary file with approximately 100k words named wordsEn.txt. There is also a file named turing_key.txt that includes six misspelled words in turing.txt that your program should be able to correct.

Note that there may be other words in the document that are not in the dictionary due to the limited size and scope of the dictionary. You do not have to correct those misspellings.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.