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

readme.md

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.

Installation

npm:

npm install gunning-fog

Usage

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...

API

gunningFog(counts)

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.

Related

License

MIT © Titus Wormer