rbughao commited on
Commit
4311303
1 Parent(s): 2b46450

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -11,8 +11,7 @@ def measure_readability(message,history):
11
  response = urllib.request.urlopen(message)
12
  html = response.read().decode('utf8')
13
  cleantext = BeautifulSoup(html).text
14
- #cleantext = BeautifulSoup(html,'lxml').text
15
- return 'answer'
16
  text = re.sub(CLEANR,'', cleantext)
17
 
18
 
@@ -33,8 +32,8 @@ def measure_readability(message,history):
33
  #print("Grade Level Comprehension is "+str(textstat.automated_readability_index(text)))
34
  vline13 = "Difficult Words "+str(textstat.difficult_words(text)) + os.linesep
35
  vline14 = "Reading Time is "+str(textstat.reading_time(text, ms_per_char=14.69)) + os.linesep
36
- #answer = vline1+vline2+vline3+vline4+vline5+vline6+vline7+vline8+vline9+vline10+vline11+vline12+vline13+vline14
37
- answer = "Flesch Reading Ease (90-100 = Easy to read, 0-29 = Very confusing to read) is "+str(textstat.flesch_reading_ease(text))
38
  return 'answer'
39
 
40
 
 
11
  response = urllib.request.urlopen(message)
12
  html = response.read().decode('utf8')
13
  cleantext = BeautifulSoup(html).text
14
+ #cleantext = BeautifulSoup(html,'lxml').text
 
15
  text = re.sub(CLEANR,'', cleantext)
16
 
17
 
 
32
  #print("Grade Level Comprehension is "+str(textstat.automated_readability_index(text)))
33
  vline13 = "Difficult Words "+str(textstat.difficult_words(text)) + os.linesep
34
  vline14 = "Reading Time is "+str(textstat.reading_time(text, ms_per_char=14.69)) + os.linesep
35
+ answer = vline1+vline2+vline3+vline4+vline5+vline6+vline7+vline8+vline9+vline10+vline11+vline12+vline13+vline14
36
+ #answer = "Flesch Reading Ease (90-100 = Easy to read, 0-29 = Very confusing to read) is "+str(textstat.flesch_reading_ease(text))
37
  return 'answer'
38
 
39