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
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