rodrigomasini commited on
Commit
42cdc01
·
verified ·
1 Parent(s): 8460a54

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -207,7 +207,7 @@ def flesch_kincaid_grade_level(text):
207
  def flesch_reading_ease(text):
208
  sentences, sentences_count = pre_process_text(text)
209
  words = extract_words(sentences)
210
- syllables = sum([count_syllables(word) for word in text.split()])
211
 
212
  if sentences_count == 0 or words == 0:
213
  return float('nan') # Return NaN to indicate an error
@@ -216,7 +216,7 @@ def flesch_reading_ease(text):
216
  def gunning_fog_index(text):
217
  sentences, sentences_count = pre_process_text(text)
218
  words = extract_words(sentences)
219
- complex_words = len([word for word in text.split() if count_syllables(word) >= 3])
220
 
221
  if sentences_count == 0 or words == 0:
222
  return float('nan') # Return NaN to indicate an error
 
207
  def flesch_reading_ease(text):
208
  sentences, sentences_count = pre_process_text(text)
209
  words = extract_words(sentences)
210
+ syllables = sum([count_syllables(word) for word in words])
211
 
212
  if sentences_count == 0 or words == 0:
213
  return float('nan') # Return NaN to indicate an error
 
216
  def gunning_fog_index(text):
217
  sentences, sentences_count = pre_process_text(text)
218
  words = extract_words(sentences)
219
+ complex_words = len([word for word in words if count_syllables(word) >= 3])
220
 
221
  if sentences_count == 0 or words == 0:
222
  return float('nan') # Return NaN to indicate an error