Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a program in C where you implement a dictionary trie that provides the abilities for a caller to insert words to a tree to

Create a program in C where you implement a dictionary trie that provides the abilities for a caller to insert words to a tree to build a dictionary and search the tree to find if a given word matches (caseinsensitive search) any stored word in the tree.

You are given a text file called word.txt. This a large file with each word on a new line. The file is also in alphabetical order. Create a dictionary trie from these words. Take into consideration the 26 letters and apostrophe ().

Please use your own file also please comment code.

https://www.chegg.com/homework-help/questions-and-answers/create-program-c-implement-dictionary-trie-provides-abilities-caller-insert-words-tree-bui-q44041743?trackid=s1KwhqIR

The question above was solved on the link above.

  1. Now, create another C program where you are given Shakespeare RomeoandJuliet.txt file which contains the whole book.
  2. You are given a text file called word.txt that contains correct spelling of words in the RomeandJuliet.txt. The word.txt does not contain every word in RomeoandJuliet.txt. Each word of word.txt it on its own line. This file is in alphabetical order (but being in alphabetical order is not relevant). This is also a large .txt file.
  3. You are basically looking for the misspelled words in RomeoandJuliet.txt. If a word is not spelled like it is in word.txt then is in incorrect.
  4. Take into account the 26 letters and apostrophe ( ). It is also case insensitive.
  5. You will need to insert the words in word.txt into a dictionary tree. This tree should allow a caller to insert words to a tree to build a dictionary and search the tree to find if a given word matches (case insensitive search). Also, stored word in the tree.
  • This is already done!! The link above!! Dont use the part where it is checking the existence of the words (because I dont need that part).
  1. This code that you will write- test your dictionary tree implementation by building a dictionary tree from a source dictionary text file and then use the dictionary tree to perform spell checks on all words read from another text file and print out all misspelled words there.
  • Basically, in this code you will use check to see if the words in RomeandJuliet.txt is spelled the same as in word.txt. If a word in RomeandJuliet.txt is not in word.txt then it is considered misspelled.
  • This code should contain main(int argc, char **argv) in this code. It should specify two arguments. The first argument is the file path to the text file to be checked for spelling (RomeandJuliet.txt). The second is for the file path to the dictionary source text file (word.txt).
  1. Print the misspelled words to standard out. You can capture standard out to a file using the > and a filename. Please show how to do this in command line. The misspelled words should be printed out EXACTLY how they were in the Romeo and Juliet book and in the order that they occurred.
  2. To sum up, insert the words in word.txt into a tree (which is already done in the link). If a word in the RomeoandJuliet.txt file is not spelled the way it is in word.txt then it is incorrect (you will need to write this part). The incorrect words should be printed to a standard out. The misspelled words should be in the order of from beginning of the file to the end of the file.
  3. Please create a new code! Dont copy the one in the link! Please comment code.
  4. Also, please create a header file for the code in the link.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

MongoDB Applied Design Patterns Practical Use Cases With The Leading NoSQL Database

Authors: Rick Copeland

1st Edition

1449340040, 978-1449340049

More Books

Students also viewed these Databases questions