KLAR / docs /REPRODUCE.md
nicofirst1's picture
Publish KLAR reproducibility bundle (v1): text-free score bundles + analysis code for the 'Alles klar?' KlarText paper
f45e98c verified
|
Raw
History Blame Contribute Delete
2.67 kB

Reproduce

Every metric table in the paper comes from the released, text-free score bundles in scores/. No closed scorer and no restricted corpus is needed. Install the analysis stack (pip install -r requirements.txt) and run the commands below from the repo root. To see the text behind a score, see DATASETS.md.

Each script maps to one research question in the paper.

RQ1 - does the metric separate simplified from original, and does the confidence weighting help?

python -m experiments.rq1_validate --dataset deplain_web --scores scores/deplain_web.jsonl

Same for the other corpora, swapping --dataset and the bundle path:

python -m experiments.rq1_validate --dataset toborek     --scores scores/toborek.jsonl
python -m experiments.rq1_validate --dataset apa_lha     --scores scores/apa_lha.jsonl
python -m experiments.rq1_validate --dataset deplain_apa --scores scores/deplain_apa.jsonl

Writes results/validation_stats_<dataset>_mw100.json and prints the discrimination and ablation report to stdout.

RQ2 - convergent validity vs. standard readability indices

Canonical two-corpus run (toborek + deplain_web, matches the paper's figure):

python -m experiments.rq2_convergent --scores-dir scores

Single-corpus run (any one dataset, e.g. apa_lha):

python -m experiments.rq2_convergent --dataset apa_lha --scores-dir scores

Writes results/rq2_convergent.json (plus a .png scatter), or results/rq2_convergent_<dataset>.json.

RQ3 - graded monotonicity across CEFR bands

python -m experiments.rq3_graded --scores scores/apa_lha.jsonl

Writes results/rq3_graded.json.

RQ4 - competitor comparison and equivalence test

Reads the scores/competitors.jsonl bundle (one row per (dataset, item, system): source/human/KLAR plus competitor models). Defaults to --datasets toborek,deplain_web (n=514), matching the paper's as-submitted table.

python -m experiments.rq4_competitors
python -m experiments.rq4_tost

Writes results/rq4_competitors/summary.json and results/rq4_tost.json, and prints the head-to-head (composite plus independent Flesch) and TOST equivalence reports.

For the pooled n=997 variant (DEplain-APA pooled in after submission), pass the same --datasets to both, since rq4_tost.py's self-test reconciles against rq4_competitors' summary.json:

python -m experiments.rq4_competitors --datasets toborek,deplain_web,deplain_apa
python -m experiments.rq4_tost --datasets toborek,deplain_web,deplain_apa

Competitor subsets are selectable independently of dataset scope, e.g. --systems capito.