Skip to content

Calculates reading levels with dynamic length sample, reads file from root directory with the filename 'text_sample.txt'. Formulas used are Gunning Fog Index, The Flesch Formula, and Power Sumner Kearl Formula. Functions were adapted into python code from https://www.tameri.com/teaching/levels.html

License

Notifications You must be signed in to change notification settings

KatsumiMaki/reading_level

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Reading Level Analysis Tool

This is a Python script that calculates the reading level of a text file using three different methods: The Gunning Fog Index, The Flesch Reading Ease Score, and the The Power Sumner Kearl Formula.

Dependencies

The script requires Python 3 and the textstat library to run. You can install the textstat library using pip:

pip install textstat

Usage

To use this script, follow these steps:

  1. Prepare your text sample in a file named text_sample.txt. Place this file in the same directory as the reading_level.py script.

  2. Run the script using Python 3:

python3 reading_level.py

The script will read the text from text_sample.txt and calculate the reading level according to each of the three methods. It will then print out the results:

  • The Gunning Fog Index, rounded to the nearest whole number.
  • The Flesch Reading Ease Score, along with the corresponding difficulty level and grade level.
  • The Power Sumner Kearl grade level and reading age, rounded to the nearest whole number.

Note

The readability measures calculated by this script are estimates and should be used as guidelines. They can help identify texts that may be more difficult for certain audiences to read, but they cannot definitively measure how easy a text is to understand. Other factors, such as the content of the text and the reader's prior knowledge, also play a significant role in readability.

About

Calculates reading levels with dynamic length sample, reads file from root directory with the filename 'text_sample.txt'. Formulas used are Gunning Fog Index, The Flesch Formula, and Power Sumner Kearl Formula. Functions were adapted into python code from https://www.tameri.com/teaching/levels.html

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages