Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Elementary Statisitcs

Authors: Barry Monk

2nd edition

1259345297, 978-0077836351, 77836359, 978-1259295911, 1259295915, 978-1259292484, 1259292487, 978-1259345296

More Books

Students also viewed these Mathematics questions