Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
| 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
|
| 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
|