rbughao commited on
Commit
130f1be
1 Parent(s): 9f9cc13

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
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 (0-29 = Very confusing to read, 90-100 = Easy to read) is "+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 (Years of education before a reader understand) is "+str(textstat.smog_index(text)) + os.linesep
59
- vline10 = "Coleman Liau Index (Grade level before a reader understand) is "+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(1-5 = can be understood by 4th grader, 8-9 = can be undestood by 11th to 15th grade student) Score "+str(textstat.dale_chall_readability_score(text)) + os.linesep
62
- vline12 = "Gunning Fog Index (Years of formal education before a reader understand) is "+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 is "+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
 
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