# Reproduce compact contributor-field calculations Requirements: Python 3.10 or newer, standard library only. From a clean folder containing the downloaded inputs, run: ``` python reproduce.py --input-dir INPUT --output-dir OUTPUT ``` `INPUT` contains `token-profile-frequencies.csv`, `role-token-count-frequencies.csv`, and `diagnostic-flags.csv`. `OUTPUT` must be a different folder. It receives `results.json`, `role-profiles.csv`, and `field-filters.csv`; source inputs are not overwritten. The inputs are compact aggregate derivatives of the official SHA256-pinned CSV, not original raw records. The single empty-component diagnostic is a retained aggregate input; token/union and nested-filter results are recalculated from the profile frequencies. To verify the original source independently, obtain the official CSV from the first reference in `sources.json` and compare its byte length and SHA256 with `source-hashes.json`. A newly generated feed may differ from the pinned snapshot. The whole bulk CSV is not included in these downloads and is not required for the compact arithmetic reproduction. Book frame: exact `dc.type == book` and empty trimmed `oapen.relation.isPartOfBook`. Roles: `dc.contributor.author`, `dc.contributor.editor`, and `dc.contributor.other`. Presence means nonempty after trimming. Literal tokenization splits semicolons only, trims components, drops empty components, and preserves commas and repeated strings. Exact-token union compares trimmed strings case-sensitively; it does not resolve people. Inclusive quantiles use index `(n-1)p` with exact Fraction interpolation. Shares and nested-filter increments are exact rational calculations. No inferential uncertainty, true person count, or actual search-interface behaviour is estimated.