Skip to main content

Calculate readability scores. e.g. Flesch, Flesch-Kincaid, and more

Project description

py-readability-metrics

Score text difficulty usings a variety of readability metrics including: Flesch-Kincaid Grade Level, Flesch Reading Ease, and more

Install

pip install py-readability-metrics

Usage

from readability import Readability

 r = Readability(text)
 print(r.flesch_kincaid())
 print(r.flesch())
 print(r.gunning_fog())

Flesch-Kincaid Grade Level

method:

r.flesch_kincaid()

returns:

Result(
    score, # float
    grade_level # string
)

Flesch Reading Ease

method:

r.flesch()

returns:

Result(
    score, # float
    ease, # string
    grade_levels, # list<str>
)

Gunning Fog

method:

r.gunning_fog()

returns:

Result(
    score, # float
    grade_level, # str
)

Contributing

see contributing

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py-readability-metrics-0.12.1.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

py_readability_metrics-0.12.1-py3-none-any.whl (8.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page