README
gunning-fog
Formula to detect the grade level of text according to the gunning fog index.
See syllable
for detecting syllables.
Install
This package is ESM only: Node 12+ is needed to use it and it must be import
ed
instead of require
d.
npm:
npm install gunning-fog
Use
import {gunningFog} from '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
This package exports the following identifiers: gunningFog
.
There is no default export.
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
retext-readability
— Complete readability measuring solutionautomated-readability
— Uses character count instead of error-prone syllable parsercoleman-liau
— Uses letter count instead of an error-prone syllable parserdale-chall-formula
— Uses a dictionary; suited for higher reading levelsflesch
— Uses syllable countflesch-kincaid
— Likeflesch
; returns U.S. grade levelssmog-formula
— Likegunning-fog-index
; without needing advanced NLPspache-formula
— Uses a dictionary; suited for lower reading levels