smog-formula
Formula to detect the grade level of text according to the SMOG (simple measure of gobbledygook) formula.
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 smog-formula
Use
import {smogFormula} from 'smog-formula'
// For “The Australian platypus is seemingly a hybrid of a mammal and reptilian
// creature.” (1 sentence; 4 polysillabic words).
smogFormula({sentence: 1, polysillabicWord: 4})
// => 14.554593…
API
This package exports the following identifiers: smogFormula
.
There is no default export.
smogFormula(counts)
Given an object containing the number of sentences (sentence
) and the number
of polysillabic (three or more syllables) words (polysillabicWord
) in a
document, returns the reading ease associated with the document.
Related
-
automated-readability
— Uses character count instead of error-prone syllable parser -
coleman-liau
— Uses letter count instead of an error-prone syllable parser -
dale-chall-formula
— Uses a dictionary, suited for higher reading levels -
flesch
— Uses syllable count -
flesch-kincaid
— Likeflesch
, returns U.S. grade levels -
gunning-fog
— Uses syllable count, needs POS-tagging and NER -
spache-formula
— Uses a dictionary, suited for lower reading levels