eurlex: per-record EUR-Lex links and attribution sidecar (v2#108)
eurlex: per-record EUR-Lex links and attribution sidecar (v2#108)
Adds data/eurlex/eurlex.attribution.jsonl: one JSON line per row of eurlex.parquet (242,488), in row order, joined by id. The Parquet and its text are unchanged (sha256 bc7d865e...eb87d).
Each line has a per-record EUR-Lex link built from the identifier at the start of the text, the issuing institution where the text names it, the notes the EUR-Lex legal notice asks for (not the authentic version, converted to plain text), and a ready-made attribution string. Fields: id, text_sha1, source_url, url_from, celex, oj, institution, institution_from, license_url, notes, attribution. They are documented in the card.
- Links: 237,588 rows (213,579 exact, 24,009 to the document or ruling the text belongs to). No link for 4,900 rows (
none_<reason>inurl_from): 3,419 whose text gives no usable identifier, and 1,481 whose built CELEX number the Publications Office database does not know (none_celex_unknown;source_urlandcelexare null and the noteno_document_linkis set; the institution is kept). Those 1,252 numbers are listed indata/eurlex/eurlex.celex-unknown.txt, pinned by SHA-256 in the builder. - Consolidated texts (17,173 rows starting
TEKST skonsolidowany) keep the labelLicenseRef-EU-Reuse-Policy; their lines carry the CC BY 4.0 link and the modification note. - 132 European Parliament minutes that point to roll-call results available on the Parliament website get their EUR-Lex link and a note that those results are not included.
- Institution: 220,297 rows; 22,191 are null by design (corrigenda, budget statements, treaties and agreements, calls and selection notices, texts with no single author). It is a heuristic over the text; a 561-row sample compared with the authors the Publications Office records agrees on 548.
Checks
Manual check: on 2026-10-20 the maintainer opened 5 addresses from the sidecar in a browser (no automated request) and each showed the intended document: an Official Journal L page (Commission decision 2004/898/WE), an Official Journal CE page (European Parliament resolution of 24.3.2009), a CELEX: address for an Advocate General opinion (C-572/10), one for a Commission proposal (COM(2018) 165) and one for a consolidated regulation (1749/96).
Automated check: the addresses were not fetched by script. eur-lex.europa.eu answers automated requests with a bot check (HTTP 202, x-amzn-waf-action: challenge), so work stopped there and nothing was bypassed. Instead every CELEX identifier was checked against the Publications Office Cellar SPARQL endpoint (a different host; its robots.txt allows /webapi/), 517 sequential requests at least 3 s apart, 2026-10-19/20. Identifiers the database does not know are left without a link (see above).
| rule | rows | rows linked | identifiers found / checked |
|---|---|---|---|
oj_file (OJ locator) |
158,583 | 158,583 | page-level sample: 1,531 / 8,035 first pages |
eurlex_header |
24,124 | 24,050 | 24,050 / 24,124 |
consolidated_header |
17,173 | 16,990 | 16,986 / 17,168 |
celex_line |
12,456 | 12,455 | 11,105 / 11,106 |
court_case |
10,041 | 9,051 | 8,134 / 8,907 |
celex_line_base |
9,390 | 9,382 | 9,326 / 9,334 |
commission_number |
5,776 | 5,576 | 5,527 / 5,724 |
eesc_file |
1,178 | 1,153 | 777 / 794 |
celex_line_old |
216 | 216 | 124 / 124 |
corrigendum_celex |
125 | 125 | 125 / 125 |
notice_celex |
7 | 7 | 7 / 7 |
"Found" means a work with that CELEX exists in the Publications Office database, not that EUR-Lex shows this exact text. Not established: beyond the 5 addresses above no page was opened; the Official Journal locator form beyond the two hand-opened addresses (the database confirms only some first pages, none before 2010, none in series CE); that court notices have a CELEX of their own (773 case-law identifiers are not in the database, 769 of them exist there under another descriptor, i.e. as the ruling). Details are in eurlex.license-evidence.json (attribution_sidecar).
Files
data/eurlex/eurlex.attribution.jsonl(about 187 MB, 178 MiB, LFS)data/eurlex/eurlex.celex-unknown.txt(1,252 CELEX numbers the database does not know)data/eurlex/eurlex.license-evidence.json,data/eurlex/eurlex.md,src/sources.pysrc/build_eurlex_attribution.py,src/test_eurlex_attribution.py
python3 src/build_eurlex_attribution.py --check rebuilds the sidecar from the pinned Parquet and compares it.
🤖 Generated with Claude Code
refs/pr/177 ref