Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
dale-chall-formula
Advanced tools
Readme
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”.
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 dale-chall-formula
import {daleChallFormula, daleChallGradeLevel} from 'dale-chall-formula'
daleChallFormula({word: 30, sentence: 2, difficultWord: 6}) // => 4.41208
daleChallFormula({word: 30, sentence: 2}) // => 0.744
daleChallFormula() // => NaN
daleChallGradeLevel(daleChallFormula(30, 2, 6)) // => [9, 10]
This package exports the following identifiers: daleChallFormula
,
daleChallGradeLevel
.
There is no default export.
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.
daleChallGradeLevel(score)
Given a score, returns the corresponding grade ranges
Score | Corresponding Grade Level | Return value |
---|---|---|
Less than 5 | Grade 4 and lower | [0, 4] |
Less than 6 | Grades 5 and 6 | [5, 6] |
Less than 7 | Grades 7 and 8 | [7, 8] |
Less than 8 | Grades 9 and 10 | [9, 10] |
Less than 9 | Grades 11 and 12 | [11, 12] |
Less than 10 | Grades 13 and 15 (College) | [13, 15] |
Higher | Grades 16 and higher (College Graduate) | [16, Infinity] |
automated-readability
— Uses character count instead of error-prone syllable parsercoleman-liau
— Uses letter count instead of an error-prone syllable parserflesch
— Uses syllable countflesch-kincaid
— Like flesch-formula
, returns U.S. grade levelsgunning-fog
— Uses syllable count, needs POS-tagging and NERsmog-formula
— Like gunning-fog-index
, without needing advanced NLPspache-formula
— Uses a dictionary, suited for lower reading levelsFAQs
Formula to detect the grade level of text according to the (revised) Dale-Chall Readability Formula (1995)
The npm package dale-chall-formula receives a total of 1,413 weekly downloads. As such, dale-chall-formula popularity was classified as popular.
We found that dale-chall-formula demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.