README
flesch-kincaid
Formula to detect the grade level of text according to the Flesch–Kincaid grade level.
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 flesch-kincaid
Use
import {fleschKincaid} from 'flesch-kincaid'
// For “The Australian platypus is seemingly a hybrid of a mammal and reptilian
// creature.” (1 sentence, 13 words, 26 syllables).
fleschKincaid({sentence: 1, word: 13, syllable: 26})
// => 13.08
API
This package exports the following identifiers: fleschKincaid
.
There is no default export.
fleschKincaid(counts)
Given an object containing the number of words (word
), the number of sentences
(sentence
), and the number of syllables (syllable
) in a document, returns
the U.S. grade level associated with the document.
Values can theoretically start at -3.40
and end at Infinity
.
Related
automated-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 countgunning-fog
— Uses syllable count, needs POS-tagging and NERsmog-formula
— Likegunning-fog-index
, without needing advanced NLPspache-formula
— Uses a dictionary, suited for lower reading levels