Formula to detect the grade level of text according to the (revised) Spache Readability Formula (1974)
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.editorconfig
.gitignore
.npmrc
.prettierignore
.travis.yml
index.js
license
package.json
readme.md
test.js

readme.md

spache-formula Build Status Coverage Status

Formula to detect the grade level of text according to the (revised) Spache Readability Formula.

See spache for a list of words which count as “known”.

Installation

npm:

npm install spache-formula

Usage

var spacheFormula = require('spache-formula')

spacheFormula({word: 30, sentence: 2, unfamiliarWord: 6}) // => 4.114

spacheFormula({word: 30, sentence: 2}) // => 2.474

spacheFormula() // => NaN

API

spacheFormula(counts)

Given the number of words (word), the number of sentences (sentence), and the number of unique unfamiliar words (unfamiliarWord) in a document, returns the grade level associated with the document.

Related

License

MIT © Titus Wormer