List of Popular readability Score algorithm and formula

  1. Flesch Reading Ease Score (FRES):
    • Formula: 206.835 – (1.015 x Average Sentence Length) – (84.6 x Average Syllables per Word)
    • Higher scores indicate easier readability, with 90-100 being very easy and 0-30 being very difficult.
    • RE = 206.835 – (1.015 x ASL) – (84.6 x ASW)
    • Where:
    • RE = Readability Ease
    • ASL = Average Sentence Length
    • ASW = Average Syllables per Word
    • Flesch-Kincaid Grade Level:
    • FKGL = 0.39 x ASL + 11.8 x ASW – 15.59
    • Where:
    • FKGL = Flesch-Kincaid Grade Level
    • ASL = Average Sentence Length
    • ASW = Average Syllables per Word
  2. Flesch-Kincaid Grade Level:
  1. Formula: 0.39 x Average Sentence Length + 11.8 x Average Syllables per Word – 15.59
  2. The result represents the U.S. school grade level needed to understand the text.
  3. Gunning Fog Index (FOG):
    • Formula: 0.4 x (Average Sentence Length + Percentage of Words with Three or More Syllables)
    • The result represents the U.S. school grade level required to understand the text.
    • unning-Fog = 0.4 * (ASL + P)
    • Where:
    • ASL = Average Sentence Length
    • P = Percentage of words with three or more syllables
    • SMOG:
    • SMOG = 1.0430 * (RT) + 3.1291
    • Where:
    • SMOG = Simplified Measure of Gobbledygook
    • RT = Square root of the number of polysyllabic words (three or more syllables) per 100 words
  1. Coleman-Liau Index:
    • Formula: (0.0588 x L) – (0.296 x S) – 15.8
    • L represents the average number of letters per 100 words, and S represents the average number of sentences per 100 words.
  2. SMOG (Simple Measure of Gobbledygook) Index:
    • Formula: 1.0430 × √(number of polysyllable words × (30/number of sentences)) + 3.1291
    • The result corresponds to the U.S. school grade level.
  3. Automated Readability Index (ARI):
    • Formula: (4.71 x (Number of Characters ÷ Number of Words)) + (0.5 x (Number of Words ÷ Number of Sentences)) – 21.43
    • The result represents the U.S. school grade level required to understand the text.
  4. Linsear Write Formula:
    • Formula: (Number of Words with 3 or More Syllables + Number of Words with 1 Syllable) ÷ Number of Sentences
    • The result corresponds to the U.S. school grade level.
  5. Dale-Chall Readability Formula:
    • Formula: 0.1579 x (Percentage of Difficult Words) + 0.0496 x (Average Sentence Length)
    • Difficult words are determined based on a predefined list.
    • Dale-Chall = (0.1579 x PDW) + (0.0496 x ASL)
    • Where:
    • Dale-Chall = Dale-Chall Readability Formula
    • PDW = Percentage of Difficult Words (words not on the Dale-Chall word list of 3,000 easy words)
    • ASL = Average Sentence Length
    • It is important to note that no readability formula is perfect, and they should be used in conjunction with other factors, such as the intended audience and the purpose of the text, to assess the readability of a piece of writing.
    • Here are some tips for improving the readability of your writing:
    • Use short sentences and paragraphs.
    • Use simple words and avoid jargon.
    • Use active voice instead of passive voice.
    • Use transition words and phrases to signal the relationship between ideas.
    • Proofread your work carefully to catch any errors in grammar or spelling.
  6. FORCAST Readability Formula:
    • Formula: 20 – (Number of Words ÷ Number of Sentences)
    • The result indicates the expected grade level of comprehension.
  7. Raygor Readability Estimate:
    • Formula: (Number of Words ÷ Number of Sentences) + (Number of Complex Words ÷ Number of Words)
    • Complex words are those with three or more syllables.

PHP code for Readilbility score for Flesch Reading Ease Score (FRES)

<?php

function calculateFRES($text) {
    // Remove punctuation and split the text into words
    $words = str_word_count($text, 1);

    // Calculate the number of words and sentences
    $numWords = count($words);
    $sentences = preg_split('/[.!?]/', $text, -1, PREG_SPLIT_NO_EMPTY);
    $numSentences = count($sentences);

    // Calculate the average sentence length (ASL) and average syllables per word (ASW)
    $totalSyllables = 0;
    foreach ($words as $word) {
        $totalSyllables += countSyllables($word);
    }

    $ASL = $numWords / $numSentences;
    $ASW = $totalSyllables / $numWords;

    // Calculate the Flesch Reading Ease Score (FRES)
    $FRES = 206.835 - (1.015 * $ASL) - (84.6 * $ASW);

    return round($FRES, 2);
}

function countSyllables($word) {
    // A simple method to count syllables in a word
    $word = strtolower($word);
    $syllables = preg_match_all('/[aeiouy]+/', $word, $matches);

    // Adjust for words ending in 'e' (usually silent)
    if (preg_match('/e$/', $word)) {
        $syllables--;
    }

    return max($syllables, 1); // Ensure at least one syllable
}

// Example usage:
$text = "This is an example sentence for readability scoring. It should return a Flesch Reading Ease Score.";
$fresScore = calculateFRES($text);

echo "Flesch Reading Ease Score: " . $fresScore;
?>
0
Would love your thoughts, please comment.x
()
x