Question: use C++ to complete this concordance program left 1. Concordance Description: ALL N Given an arbitrary text document written in English, write a program that

use C++ to complete this concordance program
use C++ to complete this concordance program left 1. Concordance Description: ALL
N 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

left 1. Concordance Description: ALL N 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 assumptions and let us know what question 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. > #include ... 3 1 * Complete the 'generateAndPrintConcordance' function below. * * The function accepts STRING_ARRAY inputlines as parameter. 3 4 5 void generateAndPrintConcordance (vector inputlines) { 16 17 18 ] 19 int main() 20 { 21 string inputlines_count_temp; 22 getline(cin, inputlines_count_temp); 23 24 int inputlines_count stoi(ltrim(rtrim(inputlines_count_temp))); 25 26 vector inputlines (inputlines_count); 27 I for (int i = @; i >> 45 46 Test Results Autocomplete Ready O int inputlines_count = stoi(ltrim(rtrim(inputlines_count_temp))); vector inputlines (inputlines_count); for (int i = 0; i (isspace))) 46 ); 47 48 return s; 49 50 51 string rtrim(const string &str) { 52 string s(str); 53 54 5.erase 55 find_f(s.begin(), s.rend(), noti(ptr_funcint, int>(isspace))).base(). SG s.end() 57 : 58 return 57 00 61 Test Results Custom Input 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 DeLorean? Sample Output: a: {4:1,2,3,3) are: (1:3) built: (1:3) delorean: (1:3) doc: (1:2) machine: 1:3) me: 1:3) minute: (2:1,2) of: (1:31 out: (1:3) telling: (1:3) that: (1:3) time: (1:3) wait: (2:1, 2) you: 12:3,3)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!