User:Phlsph7/Readability

User script
Readability.js
DescriptionSentences are colored by their readability according to the Flesch reading ease score
Author(s)Phlsph7
First releasedMay 11, 2023; 16 months ago (2023-05-11)
UpdatedMay 20, 2024
    (4 months ago)
Browser supportall modern browsers
Skin supportall skins
SourceUser:Phlsph7/Readability.js

Readability.js is a user script to color-code sentences by how many words are in the sentences and how many syllables are in each word. Red sentences are long sentences or have long words; green sentences are short sentences or have short words. Its main purpose is to help editors identify particularly difficult paragraphs and convoluted passages. It can be used both by writers creating new texts and by copyeditors trying to make existing texts more accessible.

This script calculates the Flesch reading ease score, which is a very simplistic measure that only considers two factors: words per sentence and syllables per word. According to this model, texts with long sentences and long words have lower readability than shorter sentences and short words. This measure is very superficial and often does not reflect the actual difficulty of the text. For this reason, the script should only be used as a rough guide for potential improvements. It cannot replace human judgment.

Besides coloring sentences, the script also displays a readability score for the article as a whole at the top. It includes a button to show a list of all sentences, sorted by the score. This list can be used to identify which sentences are unusually long or unexpectedly short.

The script can be used on regular articles, drafts, and pages in the user space. It also works when previewing changes. Additionally, it can be used to some extent on the project namespace and the help namespace.