# EU → CZ transposition analysis — raw data & method

Reproducible pipeline comparing 23 EU instruments with their Czech implementing acts
on strictness (gold-plating) and readability.

## Run order
    python3 src/harvest.py         # EU texts from CELLAR + Czech acts from Zákony pro lidi
    python3 src/nim.py             # national implementing measures + consolidated versions (SPARQL)
    python3 src/nim2.py            # resolve Czech NIM CELEX aliases
    python3 src/harvest_cons.py    # fetch latest consolidated EU texts
    python3 src/run_metrics.py     # readability/complexity metrics -> data/metrics.json
    #  provision-level findings and adversarial verification were produced by LLM analysts
    #  following ANALYST_BRIEF.md and VERIFIER_BRIEF.md; outputs in data/findings/ and data/verify/
    python3 src/aggregate.py       # -> data/master.json
    python3 src/build_xlsx.py ; node src/build_docx.js ; python3 src/build_dashboard.py

## Layout
    src/corpus.py        corpus manifest: CELEX <-> Czech act, section scoping, scope flags
    src/textprep.py      strips EU recitals and Czech site navigation
    src/metrics.py       Czech-language complexity metrics (line-aware segmentation)
    data/bodies/         the exact texts every finding was made against
    data/findings/       per-pair findings, each with verbatim quotes from both texts
    data/verify/         adversarial verification verdicts for severity 4-5 findings
    data/master.json     merged dataset behind all three deliverables
    data/nim.json        national implementing measure counts + consolidated CELEX ids
    ANALYST_BRIEF.md     the instruction set the analysts followed
    VERIFIER_BRIEF.md    the instruction set the refuters followed

## Quote integrity
All 332 findings were machine-checked: each `evidence_cz` / `evidence_eu` string is a literal
substring of the corresponding file in data/bodies/ (or the exact token `SMĚRNICE MLČÍ`).
Re-run the check:

    python3 - <<'EOF'
    import json,glob,os,re,unicodedata
    norm=lambda s:re.sub(r'\s+',' ',unicodedata.normalize('NFC',s)).strip()
    bad=0
    for f in sorted(glob.glob('data/findings/*.json')):
        p=os.path.basename(f)[:-5]
        eu=norm(open(f'data/bodies/{p}_eu.txt').read()); cz=norm(open(f'data/bodies/{p}_cz.txt').read())
        for x in json.load(open(f))['findings']:
            if norm(x['evidence_cz']) not in cz: bad+=1
            e=norm(x['evidence_eu'])
            if not e.upper().startswith(('SMĚRNICE MLČÍ','NAŘÍZENÍ MLČÍ')) and e not in eu: bad+=1
    print('failures:',bad)
    EOF

## Caveats
See the Metodika sheet in the xlsx and the "Omezení" chapter of the report.
Strictness scores are expert judgment expressed numerically — good for ranking, not calibrated.
