Editorial Workflows

Flesch Readability Calculator

public workflow

Install Workflow...

This workflow contains at least one Python script. Only use it if you trust the person who shared this with you, and if you know exactly what it does.

I understand, install the workflow!

This is a workflow for Editorial, a Markdown and plain text editor for iOS. To download it, you need to view this page on a device that has the app installed.

Description: The Flesch Reading Ease Readability Formula

The specific mathematical formula is:

1. RE = 206.835 – (1.015 x ASL) – (84.6 x ASW)

2. RE = Readability Ease

3. ASL = Average Sentence Length (i.e., the number of words divided by the number of sentences)

4. ASW = Average number of syllables per word (i.e., the number of syllables divided by the number of words)
5. The output, i.e., RE is a number ranging from 0 to 100. The higher the number, the easier the text is to read.

• Scores between 90.0 and 100.0 are considered easily understandable by an average 5th grader.

• Scores between 60.0 and 70.0 are considered easily understood by 8th and 9th graders.

• Scores between 0.0 and 30.0 are considered easily understood by college graduates.

• The score between 60 and 70 is largely considered acceptable. The following table is also helpful to assess the ease of readability in a document:

* 90-100 : Very Easy
• 80-89 : Easy
• 70-79 : Fairly Easy
• 60-69 : Standard
• 50-59 : Fairly Difficult
• 30-49 : Difficult
• 0-29 : Very Confusing

See:

http://www.readabilityformulas.com/flesch-reading-ease-readability-formula.php

http://www.readabilityformulas.com/freetests/six-readability-formulas.php

Shared by: daveterry

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Document Text ?
Folded Text
  • Include
  • Replace with:
Count ?
What to Count:
  • Words
  • Sentences
  • Lines
  • Characters
Set Variable ?
Variable Name
words
Value
Input
Document Text ?
Folded Text
  • Include
  • Replace with:
Count ?
What to Count:
  • Words
  • Sentences
  • Lines
  • Characters
Set Variable ?
Variable Name
sentences
Value
Input
Run Python Script ?
Source Code
#coding: utf-8
import workflow
import editor
import console

#The specific mathematical formula is: 

#1. RE = 206.835 – (1.015 x ASL) – (84.6 x ASW) 
#2. RE = Readability Ease 
#3. ASL = Average Sentence Length (i.e., the number of words divided by the number of sentences) 
#4. ASW = Average number of syllables per word (i.e., the number of syllables divided by the number of words) 
#5. The output, i.e., RE is a number ranging from 0 to 100. The higher the number, the easier the text is to read. 

#* Scores between 90.0 and 100.0 are considered easily understandable by an average 5th grader.
#* Scores between 60.0 and 70.0 are considered easily understood by 8th and 9th graders.
#* Scores between 0.0 and 30.0 are considered easily understood by college graduates.
#* The score between 60 and 70 is largely considered acceptable. The following table is also helpful to assess the ease of readability in a document: 
#	90-100 : Very Easy 
#	80-89 : Easy 
#	70-79 : Fairly Easy 
#	60-69 : Standard 
#	50-59 : Fairly Difficult 
#	30-49 : Difficult 
#	0-29 : Very Confusing 


def syllables(word):
    count = 0
    vowels = 'aeiouy'
    word = word.lower().strip(".:;?!*#()[]{}")
    if word == '':
    		 return count
    if word[0] in vowels:
        count +=1
    for index in range(1,len(word)):
        if word[index] in vowels and word[index-1] not in vowels:
            count +=1
    if word.endswith('e'):
        count -= 1
    if word.endswith('le'):
        count+=1
    if count == 0:
        count +=1
    return count

action_in = workflow.get_input()

text = editor.get_text()
#print text
syllableCount = 0

for word in text.split():
#    print(word)
    syllableCount += syllables(word)

#TODO: Generate the output...
action_out = action_in

#console.hud_alert('Syllables: ' + str(syllableCount), 'info')

workflow.set_output(str(syllableCount))
Set Variable ?
Variable Name
syllables
Value
Input
Math ?
Expression
words/sentences
On Error
  • Stop Workflow
  • Output "ERROR"
Result
  • Pass to Next Action
  • Store in Variable:
ASL
Math ?
Expression
syllables/words
On Error
  • Stop Workflow
  • Output "ERROR"
Result
  • Pass to Next Action
  • Store in Variable:
ASW
Math ?
Expression
206.835-(1.015*ASL)-(84.6*ASW)
On Error
  • Stop Workflow
  • Output "ERROR"
Result
  • Pass to Next Action
  • Store in Variable:
RE
Show Alert ?
Title
Flesch
Message
Words: words Sentences: sentences Syllables: syllables ASL: ASL ASW: ASW Flesch Reading Score: RE 90-100 : Very Easy 80-89 : Easy 70-79 : Fairly Easy 60-69 : Standard 50-59 : Fairly Difficult 30-49 : Difficult 0-29 : Very Confusing
Button 1
OK
Output Value
Input
Button 2
(don't show)
Output Value
Button 3
(don't show)
Output Value
Show Cancel Button
OFF