Lesbarkeits-Tests

Feature Engineering für NLP in Python

Rounak Banik

Data Scientist

Überblick zu Lesbarkeits-Tests

  • Bestimmen die Lesbarkeit eines englischen Textes
  • Skala von Grundschule bis Hochschulabschluss
  • Mathematische Formel mit Wort-, Silben- und Satzanzahl
  • Verwendet zur Erkennung von Fake News und Meinungs‑Spam
Feature Engineering für NLP in Python

Beispiele für Lesbarkeits-Texte

  • Flesch Reading Ease
  • Gunning Fog Index
  • Simple Measure of Gobbledygook (SMOG)
  • Dale‑Chall‑Score
Feature Engineering für NLP in Python

Beispiele für Lesbarkeits-Tests

  • Flesch Reading Ease
  • Gunning Fog Index
  • Simple Measure of Gobbledygook (SMOG)
  • Dale‑Chall‑Score
Feature Engineering für NLP in Python

Flesch Reading Ease

  • Einer der ältesten und am weitesten verbreiteten Tests
  • Je länger der durchschnittliche Satz, desto schwerer zu lesen
    • „This is a short sentence."
    • „This is longer sentence with more words and it is harder to follow than the first sentence."
  • Je mehr Silben pro Wort im Schnitt, desto schwerer zu lesen
    • „I live in my home."
    • „I reside in my domicile."
  • Je höher der Wert, desto besser die Lesbarkeit
Feature Engineering für NLP in Python

Flesch-Score: Interpretation

Reading-Ease-Score Klassenstufe
90-100 5
80-90 6
70-80 7
60-70 8-9
50-60 10-12
30-50 College
0-30 College Graduate
Feature Engineering für NLP in Python

Gunning Fog Index

  • Entwickelt 1954
  • Hängt auch von der durchschnittlichen Satzlänge ab
  • Je höher der Anteil komplexer Wörter, desto schwerer zu lesen
  • Je höher der Index, desto geringer die Lesbarkeit
Feature Engineering für NLP in Python

Gunning-Fog-Index: Interpretation

Fog Index Klassenstufe
17 College Graduate
16 College Senior
15 College Junior
14 College Sophomore
13 College Freshman
12 High School Senior
11 High School Junior
Fog Index Klassenstufe
10 High School Sophomore
9 High School Freshman
8 Eighth Grade
7 Seventh Grade
6 Sixth Grade
Feature Engineering für NLP in Python

Die Readability‑Bibliothek

# 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 für NLP in Python

Lass uns üben!

Feature Engineering für NLP in Python

Preparing Video For Download...