rodrigomasini commited on
Commit
3a397ba
·
verified ·
1 Parent(s): fc906c5

Update app_v1.py

Browse files
Files changed (1) hide show
  1. app_v1.py +3 -3
app_v1.py CHANGED
@@ -271,9 +271,9 @@ def gunning_fog_index(text):
271
  return textstat.gunning_fog(sentences)
272
 
273
  def categorize_metrics(cont_clarity, fk_reading_ease, gunning_fog):
274
- clarity_category = "Low" if cont_clarity <= 5 else "Normal" if cont_clarity <= 10 else "High"
275
- understandability_category = "Low" if fk_reading_ease <= 29 else "Normal" if fk_reading_ease <= 69 else "High"
276
- conciseness_category = "Low" if gunning_fog <= 6 else "Normal" if gunning_fog <= 12 else "High"
277
  return clarity_category, understandability_category, conciseness_category
278
 
279
  def calculate_readability_metrics(text):
 
271
  return textstat.gunning_fog(sentences)
272
 
273
  def categorize_metrics(cont_clarity, fk_reading_ease, gunning_fog):
274
+ clarity_category = "Low" if cont_clarity <= 5.0 else "Normal" if cont_clarity <= 10.0 else "High"
275
+ understandability_category = "Low" if fk_reading_ease <= 29.0 else "Normal" if fk_reading_ease <= 69.0 else "High"
276
+ conciseness_category = "Low" if gunning_fog <= 6.0 else "Normal" if gunning_fog <= 12.0 else "High"
277
  return clarity_category, understandability_category, conciseness_category
278
 
279
  def calculate_readability_metrics(text):