{"id":13577471,"url":"https://github.com/words/automated-readability","last_synced_at":"2026-01-03T17:56:25.130Z","repository":{"id":20764999,"uuid":"24049677","full_name":"words/automated-readability","owner":"words","description":"Formula to detect ease of reading according to the Automated Readability Index (1967)","archived":false,"fork":false,"pushed_at":"2022-11-01T13:56:52.000Z","size":64,"stargazers_count":51,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-05-08T18:46:50.595Z","etag":null,"topics":["automated","ease","readability","reading"],"latest_commit_sha":null,"homepage":"https://wooorm.com/readability/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/words.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":"funding.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"wooorm"}},"created_at":"2014-09-15T09:00:44.000Z","updated_at":"2024-01-20T22:15:42.000Z","dependencies_parsed_at":"2022-07-07T15:58:35.381Z","dependency_job_id":null,"html_url":"https://github.com/words/automated-readability","commit_stats":null,"previous_names":["wooorm/automated-readability"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/words%2Fautomated-readability","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/words%2Fautomated-readability/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/words%2Fautomated-readability/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/words%2Fautomated-readability/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/words","download_url":"https://codeload.github.com/words/automated-readability/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234887,"owners_count":20905852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automated","ease","readability","reading"],"created_at":"2024-08-01T15:01:21.747Z","updated_at":"2026-01-03T17:56:25.117Z","avatar_url":"https://github.com/words.png","language":"JavaScript","readme":"# automated-readability\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n\nFormula to detect the ease of reading a text according to the [automated\nreadability index][formula].\n\n## Contents\n\n*   [What is this?](#what-is-this)\n*   [When should I use this?](#when-should-i-use-this)\n*   [Install](#install)\n*   [Use](#use)\n*   [API](#api)\n    *   [`automatedReadability(counts)`](#automatedreadabilitycounts)\n*   [Types](#types)\n*   [Compatibility](#compatibility)\n*   [Related](#related)\n*   [Contribute](#contribute)\n*   [Security](#security)\n*   [License](#license)\n\n## What is this?\n\nThis package exposes an algorithm to detect ease of reading of English texts.\n\n## When should I use this?\n\nYou’re probably dealing with natural language, and know you need this, if\nyou’re here!\nThis algorithm isn’t based on syllabbles compared to some other algorithms,\nwhich means it’s quicker to calculate.\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 14.14+, 16.0+), install with [npm][]:\n\n```sh\nnpm install automated-readability\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {automatedReadability} from 'https://esm.sh/automated-readability@2'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import {automatedReadability} from 'https://esm.sh/automated-readability@2?bundle'\n\u003c/script\u003e\n```\n\n## Use\n\n```js\nimport {automatedReadability} from 'automated-readability'\n\n// For:\n//\n// The rule of rhythm in prose is not so intricate. Here,\n// too, we write in groups, or phrases, as I prefer to call\n// them, for the prose phrase is greatly longer and is much\n// more nonchalantly uttered than the group in verse; so\n// that not only is there a greater interval of continuous\n// sound between the pauses, but, for that very reason,\n// word is linked more readily to word by a more summary\n// enunciation. Still, the phrase is the strict analogue\n// of the group, and successive phrases, like successive\n// groups, must differ openly in length and rhythm. The\n// rule of scansion in verse is to suggest no measure but\n// the one in hand; in prose, to suggest no measure at all.\n// Prose must be rhythmical, and it may be as much so as\n// you will; but it must not be metrical. It may be\n// anything, but it must not be verse.\n//\n// Containing 6 sentences, 151 words, and 623 characters.\nautomatedReadability({\n  sentence: 6,\n  word: 151,\n  character: 623\n})\n// =\u003e 10.585982…\n```\n\n## API\n\nThis package exports the identifier `automatedReadability`.\nThere is no default export.\n\n### `automatedReadability(counts)`\n\nGiven an object containing the number of words (`word`), the number of\nsentences (`sentence`), and the number of characters  (`character`) in a\ndocument, returns the grade level associated with the document.\n\n##### `counts`\n\nCounts from input document.\n\n###### `counts.sentence`\n\nNumber of sentences (`number`, required).\n\n###### `counts.word`\n\nNumber of words (`number`, required).\n\n###### `counts.character`\n\nNumber of characters (`number`, required).\n\n##### Returns\n\nGrade level associated with the document (`number`).\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional type `Counts`.\n\n## Compatibility\n\nThis package is at least compatible with all maintained versions of Node.js.\nAs of now, that is Node.js 14.14+ and 16.0+.\nIt also works in Deno and modern browsers.\n\n## Related\n\n*   [`coleman-liau`](https://github.com/words/coleman-liau)\n    — uses letter count instead of an error-prone syllable parser\n*   [`dale-chall-formula`](https://github.com/words/dale-chall-formula)\n    — uses a dictionary, suited for higher reading levels\n*   [`flesch`](https://github.com/words/flesch)\n    — uses syllable count\n*   [`flesch-kincaid`](https://github.com/words/flesch-kincaid)\n    — like `flesch-formula`, returns U.S. grade levels\n*   [`gunning-fog`](https://github.com/words/gunning-fog)\n    — uses syllable count, hard to implement (needs POS-tagging and NER)\n*   [`smog-formula`](https://github.com/words/smog-formula)\n    — like `gunning-fog-index`, without the need for advanced NLP tasks\n*   [`spache-formula`](https://github.com/words/spache-formula)\n    — uses a dictionary, suited for lower reading levels\n\n## Contribute\n\nYes please!\nSee [How to Contribute to Open Source][contribute].\n\n## Security\n\nThis package is safe.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n\u003c!-- Definitions --\u003e\n\n[build-badge]: https://github.com/words/automated-readability/workflows/main/badge.svg\n\n[build]: https://github.com/words/automated-readability/actions\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/words/automated-readability.svg\n\n[coverage]: https://codecov.io/github/words/automated-readability\n\n[downloads-badge]: https://img.shields.io/npm/dm/automated-readability.svg\n\n[downloads]: https://www.npmjs.com/package/automated-readability\n\n[size-badge]: https://img.shields.io/bundlephobia/minzip/automated-readability.svg\n\n[size]: https://bundlephobia.com/result?p=automated-readability\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[typescript]: https://www.typescriptlang.org\n\n[contribute]: https://opensource.guide/how-to-contribute/\n\n[license]: license\n\n[author]: https://wooorm.com\n\n[formula]: https://en.wikipedia.org/wiki/Automated_readability_index\n","funding_links":["https://github.com/sponsors/wooorm"],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwords%2Fautomated-readability","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwords%2Fautomated-readability","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwords%2Fautomated-readability/lists"}