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
Get step-by-step solutions from verified subject matter experts
