denisecase/zig-bill-utils
Toolkit for analyzing U.S. legislative bills.
Toolkit for analyzing U.S. legislative bills.
Tested with H.Con.Res.14: Establishing the congressional budget for the United States Government for fiscal year 2025 and setting forth the appropriate budgetary levels for fiscal years 2026 through 2034.
Built a recent version of Zig
Use high-performance Zig to enhance Python projects, e.g., py-bill-utils.
This project provides six CLI tools in zig-out
os-specific folders:
Tool | Description |
---|---|
clean_bill |
Cleans bill text (removes line numbers, whitespace) |
extract_amendments |
Extracts amendments |
extract_headings |
Extracts section headers (TITLE , SEC. ) |
extract_money |
Extracts funding amounts (e.g., $5,000,000 ) |
filter_keywords |
Filters lines by keyword (listed in keywords.txt) |
split_sections |
Splits full bill into files by section |
--help
Run pipeline on each data/billname
folder:
./zig-bill-utils-run.ps1
Choose commands to build for each target as needed (Zig 0.15+ required) or run them all with PowerShell Core.
zig build install -Dtarget=aarch64-macos -Doptimize=ReleaseSafe
zig build install -Dtarget=x86_64-linux -Doptimize=ReleaseSafe
zig build install -Dtarget=x86_64-macos -Doptimize=ReleaseSafe
zig build install -Dtarget=x86_64-windows -Doptimize=ReleaseSafe
./build_all.ps1
Binaries are written to zig-out/
in operating-system specific folders.
data/billname/
src/
— Zig files for the CLI tools and shared utils and loggeroutput/billname/
MIT License © 2025 Denise Case