Skip to main content

spacy_readability

spaCy v2.0 pipeline component for calculating readability scores of of text. Provides scores for Flesh-Kincaid grade level, Flesh-Kincaid reading ease, Dale-Chall, and SMOG.

Installation

pip install spacy-readability

Usage

import spacy
from spacy_readability import Readability

nlp = spacy.load('en')
read = Readability(nlp)
nlp.add_pipe(read, last=True)

doc = nlp("I am some really difficult text to read because I use obnoxiously large words.")

print(doc._.flesch_kincaid_grade_level)
print(doc._.flesch_kincaid_reading_ease)
print(doc._.dale_chall)
print(doc._.smog)
print(doc._.coleman_liau_index)
print(doc._.automated_readability_index)
print(doc._.forcast)

Readability Scores

Readability is the ease with which a reader can understand a written text. In natural language, the readability of text depends on its content (the complexity of its vocabulary and syntax) and its presentation (such as typographic aspects like font size, line height, and line length).

  • The Flesch formulas : - Flesch-Kincaid Readability Score

    • Flesch-Kincaid Reading Ease
  • Dale-Chall formula

  • SMOG

  • Coleman-Liau Index

  • Automated Readability Index

  • FORCAST

For more in depth reading.

Contributing

Setup

  1. Install Poetry
  2. Run make setup to prepare workspace

Testing

  1. Run make test to run all tests

Linting

  1. Run make format to run black code formatter
  2. Run make lint to run pylint
  3. Run make mypy to run mypy

Metadata

Release files for spacy-readability 1.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spacy-readability 1.4.1
File Size Uploaded Provenance Actions
spacy_readability-1.4.1.tar.gz 14.4 kB Without provenance Details for spacy_readability-1.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for spacy-readability 1.4.1
File Interpreter ABI Platform Actions
spacy_readability-1.4.1-py3-none-any.whl Python 3 none any Details for spacy_readability-1.4.1-py3-none-any.whl

Total release size: 64.3 kB

Release files / spacy_readability-1.4.1.tar.gz

Download URL spacy_readability-1.4.1.tar.gz
Size 14.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6fe75a60ef2497abcbd1e58fd6e8ab7bbd4a02cff25aef88609472f647c42309
BLAKE2b-256 checksum
How to use checksums
62f762d0094602958091012b5f85f94f1ffe0d2a7bcbb0d91dd1f9ceb4d361c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.11 CPython/3.6.6 Darwin/18.2.0

Release files / spacy_readability-1.4.1-py3-none-any.whl

Download URL spacy_readability-1.4.1-py3-none-any.whl
Size 49.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93d55712a317c285a21744955cec1de994e27cf4eebb1c0906f606bd2a5cf556
BLAKE2b-256 checksum
How to use checksums
689ee8d9cdf0d54fa5fa0c6463bc6d0385c37deb5dc65a4cfe2c612a02a06869
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.11 CPython/3.6.6 Darwin/18.2.0

Security for spacy-readability 1.4.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page