Formula to detect the ease of reading a text according to the Gunning fog index (1952)
Switch branches/tags
Clone or download
Latest commit b66cefc Aug 30, 2018

gunning-fog Build Status Coverage Status

Formula to detect the grade level of text according to the Gunning fog index.

See syllable for detecting syllables.



npm install gunning-fog


var gunningFog = require('gunning-fog')

// For “The Australian platypus is seemingly a hybrid of a mammal and reptilian
// creature.”
// 1 sentence; 13 words; 4 polysillabic words, of which two are jargon, proper
// nouns, or compound words.
gunningFog({sentence: 1, word: 13, complexPolysillabicWord: 2})
// => 11.353846...



Given an object containing the number of words (word), the number of sentences (sentence), and the number of complex (excluding jargon, proper nouns, compound words) polysillabic (three or more syllables) words (complexPolysillabicWord) in a document, returns the grade level associated with the document.



MIT © Titus Wormer