Cadmium::Readability
Inherits Reference / Object
A syntactical analyzer that helps determine the readibility of a block of text.
Constructors
The constructor accepts the text to be analysed, and returns a report object which gives access to the
Instance methods
Flesch reading ease of the text sample. A higher score indicates text that is easier to read. The score is on a 100-point scale, and a score of 60-70 is regarded as optimal for ordinary text.
The Gunning Fog Index of the text sample. The index indicates the number of years of formal education that a reader of average intelligence would need to comprehend the text. A higher score indicates harder text; a value of around 12 is indicated as ideal for ordinary text.
Flesch-Kincaid level of the text sample. This measure scores text based on the American school grade system; a score of 7.0 would indicate that the text is readable by a seventh grader. A score of 7.0 to 8.0 is regarded as optimal for ordinary text.
The number of paragraphs in the sample. A paragraph is defined as a newline followed by one or more empty or whitespace-only lines.
The number of sentences in the sample. The meaning of a "sentence" is defined by Cadmium::Util::Sentence.
The percentage of words that are defined as "complex" for the purpose of the Fog Index. This is non-hyphenated words of three or more syllabes.
Return a nicely formatted report on the sample, showing most the useful statistics about the text sample.
The average number of syllables per word. The syllable count is performed by Cadmium::Util::Syllable, and so may not be completely accurate, especially if the Carnegie-Mellon Pronouncing Dictionary is not installed.