Question: Problem Statement: Write a function called summarize _ text ( ) that accepts a multi - line string ( representing a passage ) as an
Problem Statement:
Write a function called summarizetext that accepts a multiline string representing a passage as an
input and returns a summary of the text in a dictionary. The summary should include:
The total number of characters.
The total number of words.
The total number of sentences.
The most common word and its frequency if there are multiple most common words, just
return one of them
Specifications:
Input: A multiline string.
Output: A dictionary with the following keys:
o "totalcharacters": Total number of characters in the text excluding spaces
o "totalwords": Total number of words.
o "totalsentences": Total number of sentences you can assume sentences end with
or
o "mostcommonword": The most common word ignoring case
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
