readscore
Score the readability of text using popular readability formulas and metrics including: Flesch Kincaid Grade Level, Flesch Reading Ease, Gunning Fog Index, Dale Chall Readability, Automated Readability Index (ARI), Coleman Liau Index, Linsear Write, SMOG, and SPACHE.
Prerequisites
- Python 3.12 or higher
Installation
pip install readscore
Quick Start
from readscore import Readability
text = """
In linguistics, the Gunning fog index is a readability test for English writing.
The index estimates the years of formal education a person needs to understand
the text on the first reading. For instance, a fog index of 12 requires the
reading level of a United States high school senior (around 18 years old).
The test was developed in 1952 by Robert Gunning, an American businessman
who had been involved in newspaper and textbook publishing.
"""
r = Readability(text)
# Automated Readability Index (ARI)
ari = r.ari()
print(f"ARI Score: {ari.score}")
print(f"Grade Levels: {ari.grade_levels}")
print(f"Ages: {ari.ages}")
# Flesch Reading Ease
flesch = r.flesch()
print(f"Flesch Score: {flesch.score}")
print(f"Ease: {flesch.ease}")
# Flesch-Kincaid Grade Level
fk = r.flesch_kincaid()
print(f"FK Score: {fk.score}")
print(f"Grade Level: {fk.grade_level}")
# Get all statistics used for calculation
stats = r.statistics()
print(stats)
# For custom metrics, use r.stats (returns a StatSummary object)
print(r.stats)
For score interpretation, metric selection, and full API docs, see readscore.plainlicense.org.
About
readscore is a fork of the excellent py-readability-metrics library by Carmine DiMascio (@cdimascio). We wanted to build on the great work that Carmine did, and add some additional features and metrics as an engine for future Plain License projects, like our in-development CLI tool, plainr and similar plain language focused CI/CD tools. We also wanted to make some major breaking changes to the API and add robust typing support, so we decided to fork the project and start fresh.
Supported Metrics
- ARI (Automated Readability Index)
- Coleman-Liau Index
- Dale-Chall Readability Score
- Flesch Reading Ease
- Flesch-Kincaid Grade Level
- Gunning Fog Index
- Linsear Write Formula
- SMOG Index
- Spache Readability Formula
Acknowledgements
readscore is a fork of py-readability-metrics by Carmine DiMascio. We are grateful for that foundation.
Metadata
Release files for readscore 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| readscore-1.0.1.tar.gz | 137.6 kB | Without provenance | Details for readscore-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| readscore-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for readscore-1.0.1-py3-none-any.whl |
Total release size: 297.9 kB
Release files / readscore-1.0.1.tar.gz
| Download URL | readscore-1.0.1.tar.gz |
|---|---|
| Size | 137.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a03b1781e4492a83dd1b7c18bd0b7c989899157f6bc4b54974ed52a1d6580373
|
|
BLAKE2b-256 checksum How to use checksums |
59629c87f2d33e91db77f760963ca5dd63dcd197270bc1f871296c828ffc65c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / readscore-1.0.1-py3-none-any.whl
| Download URL | readscore-1.0.1-py3-none-any.whl |
|---|---|
| Size | 160.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f111cba274bc94e71fc91af393a83035fad1d3e7cfd7f1ad50781a60935037e
|
|
BLAKE2b-256 checksum How to use checksums |
bf35a60c269a8e8066f38dc5a24c9cef38233b74ded62867eb54e0ab42f640d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for readscore 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.