Testy čitelnosti

Feature Engineering for NLP in Python

Rounak Banik

Data Scientist

Přehled testů čitelnosti

  • Určení čitelnosti anglického textu
  • Škála od základní školy po absolventskou úroveň
  • Matematický vzorec využívající počet slov, slabik a vět
  • Využití při detekci fake news a spam recenzí
Feature Engineering for NLP in Python

Příklady testů čitelnosti

  • Flesch reading ease
  • Gunningův fog index
  • Simple Measure of Gobbledygook (SMOG)
  • Dale-Challovo skóre
Feature Engineering for NLP in Python

Příklady testů čitelnosti

  • Flesch reading ease
  • Gunningův fog index
  • Simple Measure of Gobbledygook (SMOG)
  • Dale-Challovo skóre
Feature Engineering for NLP in Python

Flesch reading ease

  • Jeden z nejstarších a nejpoužívanějších testů
  • Čím delší jsou věty, tím hůře se text čte
    • "This is a short sentence."
    • "This is longer sentence with more words and it is harder to follow than the first sentence."
  • Čím více slabik ve slovech, tím hůře se text čte
    • "I live in my home."
    • "I reside in my domicile."
  • Čím vyšší skóre, tím lepší čitelnost
Feature Engineering for NLP in Python

Interpretace skóre Flesch reading ease

Skóre čitelnosti Úroveň vzdělání
90-100 5
80-90 6
70-80 7
60-70 8-9
50-60 10-12
30-50 Vysoká škola
0-30 Absolvent VŠ
Feature Engineering for NLP in Python

Gunningův fog index

  • Vyvinut v roce 1954
  • Závisí také na průměrné délce věty
  • Čím více složitých slov, tím hůře se text čte
  • Čím vyšší index, tím nižší čitelnost
Feature Engineering for NLP in Python

Interpretace Gunningova fog indexu

Fog index Úroveň vzdělání
17 Absolvent vysoké školy
16 4. ročník VŠ
15 3. ročník VŠ
14 2. ročník VŠ
13 1. ročník VŠ
12 4. ročník SŠ
11 3. ročník SŠ
Fog index Úroveň vzdělání
10 2. ročník SŠ
9 1. ročník SŠ
8 8. třída ZŠ
7 7. třída ZŠ
6 6. třída ZŠ
Feature Engineering for NLP in Python

Knihovna readability

# Download nltk punkt module
import nltk
nltk.download('punkt_tab')
# Import the Readability class
from readability import Readability

# Create a Readability Object readability_scores = Readability(text)
# Generate scores gf = readability_scores.gunning_fog() print(gf.score())
16.26
Feature Engineering for NLP in Python

Pojďme si procvičit!

Feature Engineering for NLP in Python

Preparing Video For Download...