smog-formula

Formula to detect the ease of reading a text according to the SMOG (Simple Measure of Gobbledygook) formula (1969)

Usage no npm install needed!

<script type="module">
  import smogFormula from 'https://cdn.skypack.dev/smog-formula';
</script>

README

smog-formula

Build Coverage Downloads Size

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 imported instead of required.

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

License

MIT © Titus Wormer