skills/nlp/readability-metric-features/SKILL.md
Extracts established readability scores (Flesch, Gunning FOG, ARI, Coleman-Liau) as numeric features from text.
npx skillsauth add wenmin-wu/ds-skills nlp-readability-metric-featuresInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Established readability formulas compute text complexity from sentence length, syllable counts, and word difficulty. Extract these as features for regression or classification tasks involving text quality, difficulty, or grade level. The textstat library provides a unified API for all major formulas.
import textstat
def extract_readability(text):
return {
"flesch_reading_ease": textstat.flesch_reading_ease(text),
"flesch_kincaid_grade": textstat.flesch_kincaid_grade(text),
"gunning_fog": textstat.gunning_fog(text),
"ari": textstat.automated_readability_index(text),
"coleman_liau": textstat.coleman_liau_index(text),
"dale_chall": textstat.dale_chall_readability_score(text),
"linsear_write": textstat.linsear_write_formula(text),
"text_standard": textstat.text_standard(text, float_output=True),
}
df["readability"] = df["text"].apply(extract_readability)
features = pd.json_normalize(df["readability"])
textstat (pip install textstat)data-ai
Scaled Pinball Loss (SPL) metric for evaluating quantile forecasts, normalized by mean absolute successive differences of training data
data-ai
Walk backward through a time series and multiplicatively rescale segments when jumps exceed a fraction of the running mean to correct data collection anomalies
testing
Transform forecasting target to next/current ratio minus one so that optimizing MAE or squared error implicitly minimizes SMAPE
tools
Convert point forecasts to prediction intervals by scaling with logit-transformed quantile ratios passed through a Normal CDF