Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dale-chall-formula

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dale-chall-formula

Formula to detect the grade level of text according to the (revised) Dale-Chall Readability Formula (1995)

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.9K
decreased by-23.85%
Maintainers
1
Weekly downloads
 
Created
Source

dale-chall-formula Build Status Coverage Status

Formula to detect the grade level of text according to the (revised) Dale–Chall Readability Formula.

See dale-chall for a list of words which count as “familiar”.

Installation

npm:

npm install dale-chall-formula

Usage

var daleChallFormula = require('dale-chall-formula');

daleChallFormula({
  word: 30,
  sentence: 2,
  difficultWord: 6
});
// 4.41208

daleChallFormula({
  word: 30,
  sentence: 2
});
// 0.744

daleChallFormula() // NaN

daleChallFormula.gradeLevel(daleChallFormula(30, 2, 6)) // [9, 10]

API

daleChallFormula(counts)

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

daleChallFormula.gradeLevel(score)

Given a score, returns the corresponding grade ranges

ScoreCorresponding Grade LevelReturn value
Less than 5Grade 4 and lower[0, 4]
Less than 6Grades 5 and 6[5, 6]
Less than 7Grades 7 and 8[7, 8]
Less than 8Grades 9 and 10[9, 10]
Less than 9Grades 11 and 12[11, 12]
Less than 10Grades 13 and 15 (College)[13, 15]
HigherGrades 16 and higher (College Graduate)[16, Infinity]
  • automated-readability — Uses character count instead of error-prone syllable parser;
  • coleman-liau — Uses letter count instead of an error-prone syllable parser;
  • flesch — Uses syllable count;
  • flesch-kincaid — Like flesch-formula; returns U.S. grade levels;
  • gunning-fog — Uses syllable count; needs POS-tagging and NER;
  • smog-formula — Like gunning-fog-index; without needing advanced NLP;
  • spache-formula — Uses a dictionary; suited for lower reading levels.

License

MIT © Titus Wormer

Keywords

FAQs

Package last updated on 24 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc