All Projects → cdimascio → Py Readability Metrics

cdimascio / Py Readability Metrics

Licence: mit
📗 Score text readability using a number of formulas: Flesch-Kincaid Grade Level, Gunning Fog, ARI, Dale Chall, SMOG, and more

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Py Readability Metrics

Readability
Readability is Elixir library for extracting and curating articles.
Stars: ✭ 188 (+42.42%)
Mutual labels:  hacktoberfest, readability
Remoting
Jenkins Remoting module
Stars: ✭ 132 (+0%)
Mutual labels:  hacktoberfest
Blizzard Jailbreak
An Open-Source iOS 11.0 -> 11.4.1 (soon iOS 13) Jailbreak, made for teaching purposes.
Stars: ✭ 130 (-1.52%)
Mutual labels:  hacktoberfest
Boop
A scriptable scratchpad for developers. In slow yet steady progress.
Stars: ✭ 2,425 (+1737.12%)
Mutual labels:  hacktoberfest
V by example
Learn V by Example
Stars: ✭ 131 (-0.76%)
Mutual labels:  hacktoberfest
Conftest
Write tests against structured configuration data using the Open Policy Agent Rego query language
Stars: ✭ 2,047 (+1450.76%)
Mutual labels:  hacktoberfest
Simplebluetoothlibrary
Android library for simplifying bluetooth usage.
Stars: ✭ 131 (-0.76%)
Mutual labels:  hacktoberfest
Cypress Schematic
Add cypress to an Angular CLI project
Stars: ✭ 132 (+0%)
Mutual labels:  hacktoberfest
Terasologylauncher
Terasology Launcher is the official launcher for the open source game Terasology.
Stars: ✭ 132 (+0%)
Mutual labels:  hacktoberfest
Fabric Samples
wiki.hyperledger.org/display/fabric
Stars: ✭ 1,980 (+1400%)
Mutual labels:  hacktoberfest
Mentorship Backend
Mentorship System is an application that matches women in tech to mentor each other, on career development, through 1:1 relations during a certain period of time. This is the backend of this system.
Stars: ✭ 132 (+0%)
Mutual labels:  hacktoberfest
Cls Proxify
Logging on steroids with CLS and Proxy. Integrated with express, koa, fastify.
Stars: ✭ 132 (+0%)
Mutual labels:  hacktoberfest
Sea
rpc framework built on grpc
Stars: ✭ 132 (+0%)
Mutual labels:  hacktoberfest
Predictive Horizontal Pod Autoscaler
Horizontal Pod Autoscaler built with predictive abilities using statistical models
Stars: ✭ 132 (+0%)
Mutual labels:  hacktoberfest
Silverstripe Userforms
UserForms module provides a visual form builder for the SilverStripe CMS. No coding required to build forms such as contact pages.
Stars: ✭ 132 (+0%)
Mutual labels:  hacktoberfest
Email Outlook Message Perl
Email::Outlook::Message Perl module for reading Outlook .msg files
Stars: ✭ 131 (-0.76%)
Mutual labels:  hacktoberfest
Rawcms
RawCMS is the headless CMS written in asp.net core build for developers that embraces API first technology. Please give us a feedback!
Stars: ✭ 132 (+0%)
Mutual labels:  hacktoberfest
Erxes
Free and open fair-code licensed all-in-one growth marketing & management software
Stars: ✭ 1,988 (+1406.06%)
Mutual labels:  hacktoberfest
Ephemeral
A private-by-default, always-incognito browser for elementary OS
Stars: ✭ 133 (+0.76%)
Mutual labels:  hacktoberfest
Python Docs Es
Spanish translation of the Python documentation.
Stars: ✭ 131 (-0.76%)
Mutual labels:  hacktoberfest

📗 py-readability-metrics

Travis Build Python Documentation Status wheel All Contributors MIT license

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. 📗

GitHub stars Twitter URL

>

Install

pip install py-readability-metrics
python -m nltk.downloader punkt

Usage

from readability import Readability

r = Readability(text)

r.flesch_kincaid()
r.flesch()
r.gunning_fog()
r.coleman_liau()
r.dale_chall()
r.ari()
r.linsear_write()
r.smog()
r.spache()

*Note: text must contain >= 100 words*

Supported Metrics

Readability Metric Details and Properties

All metrics provide a score attribute. Indvidual metrics provide additional properties to increased interpretability. See details below to capture per metric details.

Note: In all examples below r is:

r = Readability(text)

Flesch-Kincaid Grade Level

The U.S. Army uses Flesch-Kincaid Grade Level for assessing the difficulty of technical manuals. The commonwealth of Pennsylvania uses Flesch-Kincaid Grade Level for scoring automobile insurance policies to ensure their texts are no higher than a ninth grade level of reading difficulty. Many other U.S. states also use Flesch-Kincaid Grade Level to score other legal documents such as business policies and financial forms.

call:

r.flesch_kincaid()

example:

fk = r.flesch_kincaid()
print(fk.score)
print(fk.grade_level)

Flesch Reading Ease

The U.S. Department of Defense uses the Reading Ease test as the standard test of readability for its documents and forms. Florida requires that life insurance policies have a Flesch Reading Ease score of 45 or greater.

call:

r.flesch()

example:

f = r.flesch()
print(f.score)
print(f.ease)
print(f.grade_levels)

Dale Chall Readability

The Dale-Chall Formula is an accurate readability formula for the simple reason that it is based on the use of familiar words, rather than syllable or letter counts. Reading tests show that readers usually find it easier to read, process and recall a passage if they find the words familiar.

call:

r.dale_chall()

example:

dc = r.dale_chall()
print(dc.score)
print(dc.grade_levels)

Automated Readability Index (ARI)

Unlike the other indices, the ARI, along with the Coleman-Liau, relies on a factor of characters per word, instead of the usual syllables per word. ARI is widely used on all types of texts.

call:

r.ari()

example:

ari = r.ari()
print(ari.score)
print(ari.grade_levels)
print(ari.ages)

Coleman Liau Index

The Coleman-Liau Formula usually gives a lower grade value than any of the Kincaid, ARI and Flesch values when applied to technical documents.

call:

r.coleman_liau()

example:

cl = r.coleman_liau()
print(cl.score)
print(cl.grade_level)

Gunning Fog

The Gunning fog index measures the readability of English writing. The index estimates the years of formal education needed to understand the text on a first reading. A fog index of 12 requires the reading level of a U.S. high school senior (around 18 years old).

call:

r.gunning_fog()

example:

gf = r.gunning_fog()
print(gf.score)
print(gf.grade_level)

SMOG

The SMOG Readability Formula (Simple Measure of Gobbledygook) is a popular method to use on health literacy materials.

call:

r.smog()

example:

s = r.smog()
print(s.score)
print(s.grade_level)

The original SMOG formula uses a sample of 30 sentences from the original text. However, the formula can be generalized to any number of sentences. You can use the generalized formula by passing the all_sentences=True argument to smog()

call:

r.smog(all_sentences=True)

example:

s = r.smog(all_sentences=True)
print(s.score)
print(s.grade_level)

SPACHE

The Spache Readability Formula is used for Primary-Grade Reading Materials, published in 1953 in The Elementary School Journal. The Spache Formula is best used to calculate the difficulty of text that falls at the 3rd grade level or below.

call:

r.spache()

example:

s = r.spache()
print(s.score)
print(s.grade_level)

Linsear Write

Linsear Write is a readability metric for English text, purportedly developed for the United States Air Force to help them calculate the readability of their technical manuals.

call:

r.linsear_write()

example:

lw = r.linsear_write()
print(lw.score)
print(lw.grade_level)

Contributing

Contributions are welcome!

References

License

MIT

Buy Me A Coffee

Contributors ✨

Thanks goes to these wonderful people (emoji key):


rbamos

💻 ⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].