# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

Calculate the readability of a text using a standard formula

Contributed by:
Jesse Friedman
| Jesse Friedman

ResourceFunction["ReadabilityScore"][ calculates the Flesch–Kincaid grade level score of | |

ResourceFunction["ReadabilityScore"][ calculates the readability score of | |

ResourceFunction["ReadabilityScore"][{ calculates the readability score of the | |

ResourceFunction["ReadabilityScore"][ calculares the readability score of | |

ResourceFunction["ReadabilityScore"][ represents an operator form of ResourceFunction["ReadabilityScore"] that can be applied to an expression. |

The following readability tests are supported:

"ARI" | Automated Readability Index grade level » |

"ColemanLiau" | Coleman–Liau grade level » |

"ColemanLiauCloze" | Coleman-Liau cloze fraction » |

"FleschKincaid" | Flesch–Kincaid grade level(default)» |

"FleschReadingEase" | Flesch Reading Ease score » |

"FORCAST" | FORCAST grade level » |

"GunningFog" | Gunning fog index grade level » |

"LensearWrite" | Lensear Write index |

"Rix" | Interpolated Rix grade level |

"RixScore" | Rix score |

"SMOG" | SMOG grade level » |

ResourceFunction["ReadabilityScore"]["Types"] returns a list of supported readability tests.

For the "ColemanLiauCloze", "FleschReadingEase", and "LensearWrite" tests, higher values indicate higher readability. For all other tests, higher values indicate lower readability.

Grade level indices are meant to estimate the U.S. grade level (or number of years of education, for values greater than 12) generally required to understand the text.

ResourceFunction["ReadabilityScore"][*type*][*text*] is equivalent to ResourceFunction["ReadabilityScore"][*text*,*type*].

The following option is supported:

Some readability tests require syllable metrics, which are obtained using the resource function WordSyllables. By default, only the built-in syllabic heuristics in WordSyllables are used. Setting "UseWordData" → True will cause WordSyllables to check WordData for hyphenation data, which may be slightly more accurate but generally takes longer.

Calculate the Flesch-Kincaid grade level score of Rudyard Kipling’s *The Jungle Book*:

In[1]:= |

Out[1]= |

Calculate the Rix score of Charles Darwin’s *On the Origin of Species*:

In[2]:= |

Out[2]= |

Calculate the Automated Readability Index grade level score of Stephen Wolfram’s *A New Kind of Science*:

In[3]:= |

Out[3]= |

Calculate the grade level of Lewis Carroll’s *Through the Looking-Glass* using multiple different readability tests:

In[4]:= |

Out[4]= |

Compare the Lensear Write scores for two novels involving gabled houses (higher values indicate higher readability):

In[5]:= |

Out[5]= |

Calculate the Automated Readability Index grade levels of several works of fiction by Sir Arthur Conan Doyle:

In[6]:= |

In[7]:= |

Out[7]= |

Chart the scores:

In[8]:= |

Out[8]= |

List the readability score types supported by ReadabilityScore:

In[9]:= |

Out[9]= |

By default, readability tests which require syllabic metrics are restricted to using the (generally excellent) built-in heuristics in WordSyllables:

In[10]:= |

Out[10]= |

Setting "UseWordData"→True allows WordSyllables to look up syllable hyphenation in WordData, which may be slightly more accurate but can take significantly longer to access:

In[11]:= |

Out[11]= |

Calculate and plot the Flesch-Kincaid grade level indices of American presidents’ inaugural addresses over time:

In[12]:= |

In[13]:= |

Out[13]= |

- https://en.wikipedia.org/wiki/Readability#Popular_readability_formulas
- https://en.wikipedia.org/wiki/Flesch%E2%80%93Kincaid_readability_tests
- https://en.wikipedia.org/wiki/SMOG
- https://en.wikipedia.org/wiki/Automated_readability_index
- https://en.wikipedia.org/wiki/Coleman%E2%80%93Liau_index
- https://en.wikipedia.org/wiki/Gunning_fog_index

This work is licensed under a Creative Commons Attribution 4.0 International License