[Solved] C Programming Assignment Copy Paste Another Answer Co Occurrence Problem Write Program Sol Q37194782
C++ Programming Assignment
Do not just copy and paste another answerhere!!
Co-occurrence problem?
You will write a program to solve the co-occurrence problem. Theco-occurrence problem is stat-ed as follows. We have a filecontaining English sentences, one sentence per line. Given a listof query words, your program should output the line number of linesthat have all those words. Show your pointer prowess in completingthis assignment.
Assume the text in file contains only lowercase letters , doesnot have these punctuation charac-ters ( ; “ ‘ – ) and no digits.Ignore all other punctuation characters while processing thefile.
Here is one example. Assume that the following is the content ofthe file. Line numbers are in-cluded for clarity; the actual filedoesn’t have line numbers.
1.try not to become a man of success, but rather try to become aman of value.
2.look deep into nature, and then you will understand everythingbetter.
3.the true sign of intelligence is not knowledge butimagination.
4.we cannot solve our problems with the same thinking we usedwhen we created them.
5.weakness of attitude becomes weakness of character.
6.you can not blame gravity for falling in love.
7.the difference between stupidity and genius is that genius hasits limits.
(These are quotes from Albert Einstein. )
If we are asked to find all the lines that contain this set ofwords: {“knowledge”, “imagination”,“true”} the answer will be line3 because all three words appeared in line 3. If they appear inmore than one line, your program should report all of them. Forexample, co-oc-currence of {“the”, “is”} will be lines 3 and 7.
Sample Output
Test 1
Enter a file name: einstein.txt
Enter space-separated words: the
The co-occurance for word: the
Lines: 3, 4, 7
Enter space-separated words: the is
The co-occurance for words: the, is
Lines: 3, 7
Enter space-separated words: true knowledge imagination
The co-occurance for: true, knowledge, imagination
Lines: 3
Enter space-separated words: q
Expert Answer
Answer to C++ Programming Assignment Do not just copy and paste another answer here!! Co-occurrence problem? You will write a prog… . . .
OR

