Tools and benchmarks
This package is accompanied by the tgcn_tools subpackage, a collection of tools for downloading circulars and running parsing stages in bulk.
These tools are:
collect: downloads JSON circulars in a range of IDs concurrently.filter: starting from a collection of circulars, selects a number of circular under diversity (submitter, eventId) constraints.manifest: writes a compact circular metadata manifest.brun: runs parser stages and stores self-consistent results. Useful for benchmarking parser performances or parsing a large amount of circulars fast.referencearchives the installed parser’s prompts and schemas and a worked Decisions request.
For usage details, see each command’s help.
uv run collect --help
uv run filter --help
uv run manifest --help
uv run brun --help
uv run reference --help
Building the paper benchmark
Follow these instructions from the repository root to build the paper benchmark
and evaluate a parsing pipeline specified by a config.json file.
# Collect and filter circulars using the paper benchmark defaults.
uv run collect | uv run filter > benchmark.jsonl
# Copy the hand-picked challenge set, or create your own curated.jsonl.
cp benchmarks/dataset/data/curated.jsonl curated.jsonl
uv run manifest benchmark.jsonl \
--curated curated.jsonl > manifest.jsonl
# Run each parsing stage, reusing the previous stage's results.
uv run brun lines --config config.json \
--manifest manifest.jsonl \
benchmark.jsonl curated.jsonl > lines.jsonl
uv run brun quantities --config config.json \
--manifest manifest.jsonl --lines-cache lines.jsonl \
benchmark.jsonl curated.jsonl > quantities.jsonl
uv run brun claims --config config.json \
--manifest manifest.jsonl --quantities-cache quantities.jsonl \
benchmark.jsonl curated.jsonl > claims.jsonl
In benchmarks/notebooks you will find notebooks for performance evaluation.
Configurations used in the paper are collected in benchmarks/configs/quantities.
Generating label templates
The brun tools are useful for writing label templates. To generate a
template for claims labels, setting quantities and segments to labels
annotated in the past, run:
uv run brun claims --config benchmarks/configs/cheap.json \
--manifest benchmarks/dataset/manifest.jsonl \
--quantities-cache benchmarks/dataset/labels/quantities.jsonl \
--output claims.jsonl --dry \
benchmarks/dataset/data/benchmark.jsonl benchmarks/dataset/data/curated.jsonl