Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
88 lines (64 sloc) 2.85 KB

coleman-liau Build Status Coverage Status

Formula to detect the ease of reading a text according to the Coleman-Liau index.



npm install coleman-liau


var colemanLiau = require('coleman-liau')

// For:
// Existing computer programs that measure readability are
// based largely upon subroutines which estimate number of
// syllables, usually by counting vowels. The shortcoming
// in estimating syllables is that it necessitates
// keypunching the prose into the computer. There is no
// need to estimate syllables since word length in letters
// is a better predictor of readability than word length
// in syllables. Therefore, a new readability formula was
// computed that has for its predictors letters per 100
// words and sentences per 100 words. Both predictors can
// be counted by an optical scanning device, and thus the
// formula makes it economically feasible for an
// organization such as the U.S. Office of Education to
// calibrate the readability of all textbooks for the
// public school system.
// Containing 5 sentences, 119 words, and 639 letters or digits.
colemanLiau({sentence: 5, word: 119, letter: 639}) // => 14.53042...



Given an object containing the number of words (word), the number of sentences (sentence), and the number of letters (letter) in a document, returns the grade level associated with the document.


  • automated-readability — Uses character count instead of error-prone syllable parser
  • dale-chall-formula — Uses a dictionary, suited for higher reading levels
  • flesch — Uses syllable count
  • flesch-kincaid — Like flesch-formula, returns U.S. grade levels
  • gunning-fog — Uses syllable count, hard to implement with a computer (needs POS-tagging and Named Entity Recognition)
  • smog-formula — Like gunning-fog-index, without needing advanced NLP
  • spache-formula — Uses a dictionary, suited for lower reading levels


MIT © Titus Wormer