wooorm / readability

visualise readability
https://wooorm.com/readability/
MIT License
203 stars 19 forks source link

SMOG - SmogToAge #5

Closed MichaelChambers closed 4 years ago

MichaelChambers commented 4 years ago

Your SMOG formula matches the values in https://en.wikipedia.org/wiki/SMOG, which you refer to. That site says the result is a grade. Your smog-formula returns 11.2 for the Gettysburg Address, which is an appropriate grade level based on the other tests' scores. But your smogToAge method must have been based on something else, and is returning age 6 as the result for an 11.2 score. I think you just want it to be the same gradeToAge call you have for the other tests.

wooorm commented 4 years ago

Weird, the code “inverts” the smog formula to get a score instead of an age. For some reason I must’ve thought that smog-formula didn‘t return a grade-level (which dale-chall-formula also doesn’t do) 🤷‍♂️