Write a program that reads a report (running text), issues warnings on style with the following features.
Statistics A statistical summary is prepared for each report processed with the following information:
Style Warnings Issue a warning in the following cases:
Run Summary At the end of the run the special words are written to the file with the number of times each was used during the run of the program.
From the keyboard:
1. The name of the file containing the text to be analyzed
2. List of special words
From the file:
The report to be analyzed; ended by < eof>. Allow the user to continue with another file name or quit.
1. For each report being analyzed write the following information to a file.
2. An alphabetical listing of the special words one per line with the number of times each was used throughout the run of the program.
1. A list to contain the special words
2. A list of unique words in the report, created as the file is read. If a word is not in the list, put it there. If it is, increment a counter showing how many times the word has been used.
Word : Sequence of letters ending in a blank, a period, an exclamation point, a question mark, a colon, a comma, a single quote, a double quote, or a semicolon. Numbers do not appear in the words; they may be ignored.
Unique word: Words that are spelled the same, ignoring uppercase and lowercase distinctions.
Sentence : Words between end of sentence markers or the beginning of the report and the first end of sentence marker.