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).
Popular Metrics
-
The Flesch formulas : - Flesch-Kincaid Readability Score
- Flesch-Kincaid Reading Ease
-
Dale-Chall formula
-
SMOG
-
Coleman-Liau Index
-
Automated Readability Index
-
FORCAST
Contributing
Setup
- Install Poetry
- Run
make setupto prepare workspace
Testing
- Run
make testto run all tests
Linting
- Run
make formatto run black code formatter - Run
make lintto run pylint - Run
make mypyto 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)
| File | Size | Uploaded | |
|---|---|---|---|
| spacy_readability-1.4.1.tar.gz | 14.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spacy_readability-1.4.1-py3-none-any.whl | Python 3 | none | any | Details |
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
|