Question
(a) Write function called reading_ease() that will compute the Flesch reading ease score for an input text passage. The Flesch reading ease formula and rules
(a)
Write function called reading_ease() that will compute the Flesch reading ease score for an input text passage. The Flesch reading ease formula and rules for counting sentences, words, and syllables must adhere to the descriptions given in Section 5 of the Chapter 9 notes.
Your function should be able to compute the reading ease score for an entire text passage if it is inputted as a single character value (i.e., all sentences in a single string) or as a character vector (i.e., sentences may be split into separate strings).
(b)
Verify that your reading_ease() function from (a) works on the waffles passage from the Chapter 9 notes (you may source the waffles.R file in your Rmd file). Verify that you compute the same Flesch reading ease score for the following vector:
waffles_vec <- c("We need to remember what's important in life: friends, waffles, work.", "Or waffles, friends, work.", "Doesn't matter, but work is third." )
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started