Question: use c++ to complete 1. Concordance Description: Given an arbitrary text document written in English, write a program that will generate a concordance, i.e. an



1. Concordance Description: Given an arbitrary text document written in English, write a program that will generate a concordance, i.e. an alphabetical list of all word occurrences, labeled with word frequencies. In addition, label each word with the sentence numbers in which each occurrence appeared. There are no right or wrong answers - we assess each solution based on the quality of thinking, the tangible progress made, and the time it took to produce. To keep the evaluation fair and efficient, we generally won't answer follow-up questions about the problem. If you aren't sure about something, just make reasonable Issumptions and let us know what questions you would have asked if given the opportunity. Similarly, feel free to share alternative ways of the thinking about or solving the problem if you feel that you are limited in this scenario. Note: The output will NOT be graded by text- matching alone and will be evaluated on the above criteria. Input Format: Locked stub code in the editor reads the following input from stdin and passes it to the function: . The first line contains a single integer, n, denoting the number of lines of text to process. Each line/of the n subsequent lines (where 0 si ni contains a line of text that should be included in the number of lines of text to process. Each line of the n subsequent lines (where 0 sis n) contains a line of text that should be included in the concordance. Output Format: The function should print the concordance - in alphabetical order to stdout in the following format: Each line should contain the word followed by a) the total number of occurrences and b) the sentence numbers in which the word occurs. Sample Input: 2 Wait a minute. Wait a minute, Doc. Are you telling me that you built a time machine out of a DeLorean? Sample Output: a: 04:1,2,3,37 are (1:3) built! (1:3) delorean: 1:3) doc: (1:2) machine: (1:3) me: (1:3) minute: 12:1,2) of: (1:3) out: 1:3) telling (1:3) * * 1 > #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
