Expand description
Native legislation structure parse → hypermedia Library ingest.
Ports the structural (no-LLM) path of tools/legislation-etl/legis2cml.py:
Part / Division / Schedule / Section / Subsection decomposition, then seeds
each provision as a findable Library entry under Work with purpose
legislation. Full section body text is always stored (the Python ETL used
to drop bodies from N3/JSON-LD — this path does not).
PDF → text uses pdf_extract (already a client-core dependency).
Structs§
Constants§
- LEGISLATION_
INSTRUMENT_ MEDIA - LEGISLATION_
MEDIA_ TYPE - Media type for native legislation provision entries.
Functions§
- extract_
pdf_ pages - Extract text pages from a PDF file.
- extract_
pdf_ pages_ from_ bytes - ingest_
legislation_ pdf_ bytes - Parse PDF bytes and seed the library.
- ingest_
legislation_ text - Parse plain text (already extracted) as a single-page instrument and seed.
- parse_
pages - Parse legislation pages into structured provisions (AU-oriented; EU Article/Chapter supported).
- seed_
instrument_ into_ library - Seed a parsed instrument into the hypermedia library (instrument + every provision).