Skip to main content

Flesch Kincaid readability scoring algorithm

Project description

fkscore

Flesch Kincaid readability score for text

A Python module implementation of the Flesch Kincaid readability score algorithm.

The source code is released under the MIT License.

Installation

pip3 install fkscore

Usage

For text in python represented as a string.

Takes text as string datatype. Words can be on same or different lines. Current version is English language only. Requires pyphen 0.9.5+. Email for support.

import fkscore
text = '...blah blah blah...'
f = fkscore.fkscore(text)
print(f.stats)
print(f.score)

Output

Output includes 2 dictionaries of information as follows:

  • stats:
    • stats['num_words']
    • stats['num_syllables']
    • stats['num_sentences']
  • score:
    • score['readability'] # Calculated F-K Readability Score
    • score['grade'] # Permuted F-K Grade Reading Level

Releases

Releases and additions will push to PyPi periodically, but if there is a feature in master not built/pushed and you want it to be, just ping me.

History

This is a maintained as an original implementation of the Flesch-Kincaid readability score algorithm which has been around since 1975. The module is pure python and works with 3.5+.

Questions

Feel free to ping for questions, comments, concerns or hit the repository.
Randall Shane, PhD
Randall.Shane@CodeIntelligence.IO
https://github.com/RandallShanePhD/fkscore
Thank you!

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

fkscore-1.1.1.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

fkscore-1.1.1-py3-none-any.whl (3.8 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