Implement the spell checker and the hash table

Assignment Help Basic Computer Science
Reference no: EM132336799

Question

A spell checker that stores a set of words, W, in a hash table and implements a function, spellCheck(s), which performs a spell check on the string s with respect to the set of words, W.

If s is in W, then the call to spellCheck(s) returns an iterable collection that contains only s, because it is assumed to be spelled correctly in this case. Otherwise, if s is not in W, then the call to spellCheck(s) returns a list of every word in W that could be a correct spelling of s.

Your program should be able to handle all the common ways that s might be a misspelling of a word in W, including

  • swapping adjacent characters in a word;
  • inserting a single character in between two adjacent characters in a word;
  • deleting a single character from a word; and 
  • replacing a character in a word with another character. 

The input to your program will consist of the name of a text file, and strings of characters manually entered by the user. The text file will contain the set of words, W, one word per line, and should be read in the program when the program starts. The strings of characters input by the user will be used to test the hash table and the spellCheck function. The program will keep running the tests until the user enters the string "quit".

Using classes SpellChecker and HashTable to implement the spell checker and the hash table, respectively

Using UML class diagram that describes your class design.

Reference no: EM132336799

Questions Cloud

Architecture models of health information exchange : Discuss the advantages and disadvantages of each and the role data ownership plays in each model. Your initial post should include credible/peer-review APA
Digital communication applications using matlab : Understand the importance of multiuser resource allocation techniques employed in the uplink of modern digital communication networks using wireless medium
Discuss the relationship between data and knowledge : Discuss the relationship between data, information, and knowledge. Support your discussion with at least 3 academically reviewed articles.
Identify the name of the wizard : Choose a design wizard; write observations below as you work through the process of using it to prepare for the initial post.
Implement the spell checker and the hash table : Using classes SpellChecker and HashTable to implement the spell checker and the hash table, respectively
Translate the pseudocode in the text into java : You should be able to compile the code without error and run it with correct results.
Discuss how genetic engineering may impact field of nursing : Discuss how genetic engineering may impact the field of Nursing. Discuss how genetic engineering may impact the protocol of care within the field of Nursing.
Discuss the different types of muscle fibers : Did your research discuss the different types of muscle fibers that develop with different types of training and why this is so?
Write on Neonatal Mortality for India and USA : Select ONE health condition from list below and compare disparities in health outcomes. Write on Neonatal Mortality for India and USA

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Write a class called student that will keep track of student

Write a class called Student that will keep track of a student and a grade.

  What is the present value of cash flows-mccann co

McCann Co. has identified an investment project with the following cash flows.

  Austin commonplaces of law

Based on your reading of the Introduction, describe the three commonplaces of law and create examples to illustrate the meaning of each commonplace.

  Write the pseudocode for program

A nutritionist wants a program that calculates fat grams and calories in a food item, using the following formula:

  What is the probability of getting a grade of 91 or less

The final grade is normally distributed with a mean of 73 and a standard deviation of 8.

  Define static binding and dynamic binding

1. Define static binding and dynamic binding and give an example of each. Static binding occurs at compile time and dynamic binding occurs at run time. 2. Describe a situation when a history sensitive variable in a subprogram is useful.

  Create a class template for a class that holds an object

"You will be asked to enter X items"-where X is the number of data elements. Write a main()function that tests your template class with an integer and two programmerdesigned classes. Save the file as NumberOfFields.cpp.

  For an item the production is instantaneous

For an item the production is instantaneous. The storage cost of one item is Re.1/- per month and the set up cost is Rs. 25/- per run. If the demand for the item is 200 units per month, find the optimal size of the batch and the best time for the rep..

  Determine how many fields there are in the udp header

1. Select one packet. From this packet, determine how many fields there are in the UDP header. (Donot look in the textbook! Answer these questions directly from what you observe in the packettrace.) Name these fields.

  Create a procedure that displays the name

Create a procedure that displays the name of the customer with the highest amount of orders among all customers - Modify the PRODUCT table by adding

  Statement that includes a case value expression

You want one of the conditions to specify that any ON_ORDER values greater than 10 should be increased by 5. How should you set up the WHEN/THEN clause?

  Number of potential connection services

What is the increase in the number of potential connection services if one additional user joins the network?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd