Is there a command line program that takes a file containing English text, analyzes the text, and outputs its readability scores?
For example, if one feeds the program a text, the program should output the Flesch-Kincaid grade level, McLaughlin's SMOG grading, etc.
I believe such a program exists in the official repositories, but I cannot remember its name. There's also the possibility that I am misremebering.
The
diction
package contains a tool calledstyle
:For example, if I evaluate your question body (saved in a file
flux_question
) to print the sentences with a readability index (ARI) over 10:To filter the output you can use e.g.
tail -n8
to get only the grades orgrep 'Flesch\|SMOG'
to just print the Flesch Index and the SMOG-Grading:Further reading
man style