jedarden
|
4ac8479ad9
|
test(pdftract-1sxpa): complete inline image header parser implementation
- Implement recover_to_next_key function with byte-by-byte scanning
for '/' and 'ID' keywords to enable error recovery in malformed headers
- Fix test assertion: StructInvalidDictValue -> StructInvalidType
- Fix ID whitespace validation test input (IDEI -> ID)
- Fix markdown.rs test calls to include tables parameter
- Add book_chapter fixture provenance entries
All 14 inline_image tests pass, covering:
- Basic header parsing with shorthand key expansion
- Array filter chains
- ID whitespace validation
- Malformed header recovery
Acceptance criteria:
- PASS: BI /W 10 /H 10 /CS /DeviceGray /BPC 8 /F /ASCIIHexDecode ID parses
- PASS: Shorthand expansion (/W -> /Width) yields width == 10
- PASS: Array filter /F [/ASCII85Decode /FlateDecode] parses
- PASS: ID without trailing whitespace emits diagnostic
- PASS: Malformed header (missing value) emits diagnostic and recovers
Co-Authored-By: Claude Code <noreply@anthropic.com>
|
2026-05-27 22:18:09 -04:00 |
|
jedarden
|
8b63217dbf
|
feat(pdftract-260a3): implement legal_filing profile with fixtures and tests
Implements the legal_filing document profile for court filings (motions,
briefs, orders, docket entries) with:
- Profile YAML at profiles/builtin/legal_filing/profile.yaml
- Fields: case_number, court, parties, filing_date, docket_entries
- Match predicates for court name, case numbers, party markers
- Extraction: xy_cut reading order, include_headers_footers=true
- 5 synthetic PDF fixtures at tests/fixtures/profiles/legal_filing/
- federal_complaint: Federal district court complaint
- state_motion: State superior court motion to dismiss
- appellate_brief: Federal appellate brief
- court_order: Federal district court order
- docket_sheet: Docket sheet with entries
- 5 expected output JSON files with profile_fields
- Regression tests at crates/pdftract-cli/tests/test_legal_filing.rs
- 14/14 tests pass
- Verifies profile schema, fixture structure, match predicates
Acceptance criteria (from bead pdftract-260a3):
- ✅ profiles/builtin/legal_filing.yaml validates
- ✅ 5+ public-domain fixtures with expected outputs
- ✅ tests/test_legal_filing.rs passes
- ✅ Per-field accuracy thresholds defined (integration tests pending Phase 7.10)
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-27 21:44:49 -04:00 |
|