Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -53,16 +53,16 @@ def measure_readability(message,history):
|
|
53 |
vline5 = "Sentence Count "+str(textstat.sentence_count(text)) + os.linesep
|
54 |
vline6 = " " + os.linesep
|
55 |
vline7 = "==== Result ==== " + os.linesep
|
56 |
-
vline8 = "Flesch Reading Ease
|
57 |
#print("Flesch-Kincaid Grade Level is "+str(textstat.flesch_reading_ease(text)))
|
58 |
-
vline9 = "Smog Index
|
59 |
-
vline10 = "Coleman Liau Index
|
60 |
#print("Automated Readability Index (Grade level before a reader understand) is "+str(textstat.automated_readability_index(text)))
|
61 |
-
vline11 = "Dale-Chall Readability
|
62 |
-
vline12 = "Gunning Fog Index
|
63 |
#print("Grade Level Comprehension is "+str(textstat.automated_readability_index(text)))
|
64 |
#vline13 = "Difficult Words "+str(textstat.difficult_words(text)) + os.linesep
|
65 |
-
vline14 = "Reading Time
|
66 |
answer = vline1+vline2+vline3+vline4+vline5+vline6+vline7+vline8+vline9+vline10+vline11+vline12+vline14
|
67 |
#answer = "Flesch Reading Ease (90-100 = Easy to read, 0-29 = Very confusing to read) is "+str(textstat.flesch_reading_ease(text))
|
68 |
return answer
|
|
|
53 |
vline5 = "Sentence Count "+str(textstat.sentence_count(text)) + os.linesep
|
54 |
vline6 = " " + os.linesep
|
55 |
vline7 = "==== Result ==== " + os.linesep
|
56 |
+
vline8 = "Flesch Reading Ease = "+str(textstat.flesch_reading_ease(text)) + os.linesep
|
57 |
#print("Flesch-Kincaid Grade Level is "+str(textstat.flesch_reading_ease(text)))
|
58 |
+
vline9 = "Smog Index = "+str(textstat.smog_index(text)) + os.linesep
|
59 |
+
vline10 = "Coleman Liau Index = "+str(textstat.coleman_liau_index(text)) + os.linesep
|
60 |
#print("Automated Readability Index (Grade level before a reader understand) is "+str(textstat.automated_readability_index(text)))
|
61 |
+
vline11 = "Dale-Chall Readability Score = "+str(textstat.dale_chall_readability_score(text)) + os.linesep
|
62 |
+
vline12 = "Gunning Fog Index = "+str(textstat.gunning_fog(text)) + os.linesep
|
63 |
#print("Grade Level Comprehension is "+str(textstat.automated_readability_index(text)))
|
64 |
#vline13 = "Difficult Words "+str(textstat.difficult_words(text)) + os.linesep
|
65 |
+
vline14 = "Reading Time = "+str(textstat.reading_time(text, ms_per_char=14.69))+" seconds"+ os.linesep
|
66 |
answer = vline1+vline2+vline3+vline4+vline5+vline6+vline7+vline8+vline9+vline10+vline11+vline12+vline14
|
67 |
#answer = "Flesch Reading Ease (90-100 = Easy to read, 0-29 = Very confusing to read) is "+str(textstat.flesch_reading_ease(text))
|
68 |
return answer
|