Using the p-search script, process the alice.txt file containing Lewis Caroll's novel "Alice's Adventures in Wonderland". The idea is to find all Disney characters that appear in the novel.

computer science

Description

4. Using the p-search script, process the alice.txt file containing Lewis Caroll's novel "Alice's Adventures in Wonderland". The idea is to find all Disney characters that appear in the novel. To that end, use the provided disney_chars.txt as the keywords file. Copy the output of your Python interpreter into a file named "out.txt" and upload it. Then answer the following questions:

    a. Type all Disney characters that p-search was able to find.
    b. Type the number of times each character appear. (hint: don't count manually; use the "count" or "replace" feature of Notepad++ or another good text editor - be careful not to count twice!)
    c. What is the offset of the first and last occurrence of the character 'Alice'? (hint: check the "Index of All Words" section in "out.txt")
    d. Type the number of times the word 'thoughtfully' appears within the alice.txt file and its offset values.



Related Questions in computer science category