Skip to content

feat: IPTC domain taxonomy, TOC keywords, and image region metadata - #464

Merged
EricNGOntos merged 5 commits into
mainfrom
feat/wuchengke/iptc-domain-and-toc-keywords
Oct 16, 2026
Merged

EricNGOntos merged 5 commits into
mainfrom
feat/wuchengke/iptc-domain-and-toc-keywords

Conversation

@EricNGOntos

Copy link
Copy Markdown
Contributor

Summary

  • Replace open-ended document category with IPTC Media Topics top-level codes (multi-select) plus category_label, with invalid picks falling back to OTHER.
  • Add line-start TOC keyword extras: global exhibit index; finance-only index to / index of.
  • Carry image region / bbox metadata through markdown and PDF parsing, including shard identity wiring.

Test plan

  • make check (ruff + pyright)
  • Focused worker tests for domain taxonomy, coarse profile, and TOC anchor selection
  • CI green on this PR

Made with Cursor

EricNGOntos and others added 5 commits October 16, 2026 18:29
- Added support for extra metadata in the MarkdownParseState to store image region information.
- Updated the append_row method to accept additional metadata and store it in a new dictionary.
- Modified the parse_md function to include image region metadata when processing markdown content.
- Integrated image region loading in the PDF parsing workflow to ensure accurate page number mapping after TOC removal.
- Adjusted tests to validate the new metadata structure and ensure consistency across chunk and zip formats.
… parsing

- Introduced `extra_metadata` parameter in `build_image_asset_row` to accommodate additional image region information.
- Updated `ParsedRow` and related methods to handle the new `extra_metadata` field.
- Modified markdown and pdf parsing functions to integrate image region metadata, ensuring accurate representation in output.
- Adjusted tests to validate the inclusion of `extra_metadata` in various parsing scenarios.
…oved metadata

- Updated `DocumentProfile` to support a list of categories and an additional `category_label` for better classification.
- Modified the coarse profiling process to extract domain IDs and category labels from input data, ensuring accurate document classification.
- Enhanced the parsing instructions to reflect the new structure, requiring domain IDs and category labels for document classification.
- Adjusted related functions and tests to accommodate the new multi-category and label features, ensuring consistency across document types.
- Changed document profiling to utilize IPTC Media Topics instead of ISIC codes for categorization.
- Updated `DocumentProfile` and related parsing instructions to reflect the new category structure.
- Adjusted coarse profiling prompts and functions to align with the IPTC classification system.
- Modified tests to validate the new category codes and ensure consistency across document types.
Move exhibit index to the global line-start keyword set, and keep
finance-only index to/of prefixes for SEC-style statement indexes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@EricNGOntos
EricNGOntos merged commit 2ed1889 into main Oct 16, 2026
6 checks passed
@EricNGOntos
EricNGOntos deleted the feat/wuchengke/iptc-domain-and-toc-keywords branch October 16, 2026 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant