Question
https://www.chegg.com/homework-help/questions-and-answers/c-use-trie-dictionary-q12760469?trackid=d57ce9644d5f&strackid=9a9dff9e64ad Please edit the 3 C++ programs in the link above so that is works with the prompt below. Remove all the unnecessary parts of
https://www.chegg.com/homework-help/questions-and-answers/c-use-trie-dictionary-q12760469?trackid=d57ce9644d5f&strackid=9a9dff9e64ad
Please edit the 3 C++ programs in the link above so that is works with the prompt below. Remove all the unnecessary parts of the code. Add to code as well. Make sure the program runs. Use the .txt files below. Show output!!
word.txt contains the words below each on a new line in alphabetical order
an
be
coals
colliers
I
Gregory
mean
well
~~~~~~~~~~~~~
RomeoandJuliet.txt contains
Gregory, on my word well not carry coals. No, for then we should be colliers. I mean, an we be in choler, well draw.
~~~~~~~~~~~~~~~~~
- You will need to create TWO C++ programs (.c) . And create ONE header file (.h).
- Please comment all the files.
- First program- You will need to insert the words in word.txt into a dictionary trie. This trie should allow a caller to insert words to a trie and search the trie to find if a given word matches (case insensitive search) any stored word in the trie.
- Basically put word.txt in a dictionary trie
- Take into account the 26 letters and apostrophe ( ). It is also case insensitive.
- Second program- Next test your dictionary trie implementation by performing spell checks on all words read from RomeoandJuliet.txt.
- 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.
- Search the dictionary trie. If a word is in the trie then it is correct.
- Make a header file!!
- Please read in the two text files!!!
- 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 exactly how they were in the Romeo and Juliet book.
- There should be no print statements in the code.
- Also, do not ask for user input.
- Each misspelled word should be on a new line.
- The words below are misspelled because they are not in word.txt.
- Misspelled words are
on
my
word
not
carry
No
for
then
we
should
we
in
choler
draw
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