Question: Implement a spelling checker by using a hash table. Assume that the dictionary comes from two sources: an existing large dictionary and a second file

Implement a spelling checker by using a hash table. Assume that the dictionary comes from two sources: an existing large dictionary and a second file containing a personal dictionary. Output all misspelled words and the line numbers in which they occur. Also, for each misspelled word, list any words in the large dictionary that are obtainable by applying any of the following rules: a) Add one character. b) Remove one character. c) Exchange adjacent characters.

Implement this problem as described with the exception of the secondary dictionary. Your program, called SpellChecker.java should take two command line arguments, the dictionary (provided here as words.txt), and the text that you wish to spellcheck. Provide some sample text. Your program should be case insensitive (so you can toLower everything). Numbers and contractions are considered valid words. You may use the java HashTable or HashMap to implement this program; but it must use some kind of hash table.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!