clearnote01 / readability

npm package to calculate readability statistics of a text object - paragraphs, sentences, articles.
MIT License
73 stars 13 forks source link

Feature Request: Provide a Readability Consensus score (based upon all tests), return the estimated school grade #11

Closed SaadBazaz closed 9 months ago

SaadBazaz commented 2 years ago

Hey there, First off, thanks for this awesome repo. I have a feat. request, as described in the title, which I'd like to directly use in one of my projects.

A function in which we can provide a Readability Consensus score (based upon all tests), and return the estimated school grade.

Reason

Building a grammar correction bot, and need to create an "average value" of its performance on multiple grammar fixes, and after that I want to describe the estimated school grade level needed to read the text.

Example:

On average, the **readability score** of your original documentation is **3.81** ("Fairly Difficult").
To keep it simple; a student between ${<<insert value here, e.g. "9th and 10th grade">>} can understand your documentation.
clearnote01 commented 9 months ago

I'm happy to accept patches but cannot add major changes here. There is already grade provided through rs.fleschKincaidGrade(text), which might suffice.