- Create fuzz/fuzz_targets/profile_yaml.rs to test YAML parsing - Register profile_yaml target in fuzz/Cargo.toml - Verify cargo-fuzz 0.13.1 is installed and working - All 7 fuzz targets now operational per plan requirement (line 3236) Closes bf-1b7od. Verification: notes/bf-1b7od.md
3.4 KiB
3.4 KiB
bf-204mm: Multi-Page Report OCR Fixture
Task
Add multi-page report OCR fixture (≥5 pages) with ground truth text for WER testing.
What Was Done
Files Modified
tests/fixtures/scanned/multi-page/report-300dpi.pdf- Replaced text-embedded version with scanned version (2.2M)tests/fixtures/scanned/multi-page/report-300dpi-ground-truth.txt- Renamed fromreport-300dpi.txt
Implementation Notes
The fixture already existed as doc-10page-300dpi-scanned.pdf with identical ground truth content. The task requirement was to have it named as report-300dpi.pdf with proper -ground-truth.txt suffix.
Source
- Content: Public-domain multi-page document (government report-style content)
- Original fixture:
doc-10page-300dpi-scanned.pdf(same content)
Acceptance Criteria - PASS
✅ PASS: report-300dpi.pdf exists with ≥5 pages
- Verified: 11 pages
- Command:
pdfinfo tests/fixtures/scanned/multi-page/report-300dpi.pdf | grep Pages - Output:
Pages: 11
✅ PASS: Ground truth .txt file exists
- File:
tests/fixtures/scanned/multi-page/report-300dpi-ground-truth.txt - Size: 12K
- Content: Complete text transcript of all 11 pages
✅ PASS: Running scripts/measure-wer.sh with perfect OCR gives WER = 0%
- Command:
./scripts/measure-wer.sh tests/fixtures/scanned/multi-page/report-300dpi-ground-truth.txt tests/fixtures/scanned/multi-page/report-300dpi-ground-truth.txt - Output:
WER: 0.0000 (0.00%) - This confirms the WER calculation works correctly when OCR output matches ground truth exactly
✅ PASS: PDF is ~300 DPI
- Image dimensions: 2550 x 3300 pixels per page
- Page size: Letter (8.5 x 11 inches)
- DPI calculation: 2550 / 8.5 = 300 DPI, 3300 / 11 = 300 DPI
- Verified via:
pdfimages -listshowing 2550x3300 RGB images
Technical Details
Fixture Properties
- Format: Scanned PDF (image-based, no embedded text)
- Pages: 11 pages
- Resolution: 300 DPI (2550x3300 pixels per page on Letter size)
- Color: RGB
- File size: 2.2M
- Content types: Introduction, text-heavy content, forms, tables, technical specs, legal text, financial statements, correspondence, scientific content, summary
Content Variety
The fixture contains diverse content types for comprehensive OCR testing:
- Introduction and overview
- Text-heavy technical documentation
- Form with fields and checkboxes
- Tabular data with formatting
- API technical specifications
- Legal terms and conditions
- Financial balance sheet
- Business correspondence
- Scientific abstract and methodology
- Summary and conclusions
Verification Steps Completed
- ✅ Verified page count (11 pages ≥ 5 required)
- ✅ Verified ground truth file exists with correct naming
- ✅ Verified WER calculation returns 0% for perfect match
- ✅ Verified PDF is scanned (images) not text-embedded
- ✅ Verified DPI is ~300 (300 x 300)
Commit Information
- Files changed: 2 files (renamed/copied)
- Commit message:
feat(bf-204mm): add multi-page report OCR fixture
Notes
- The fixture content is identical to
doc-10page-300dpi-scanned.pdf(same MD5 checksum for ground truth) - This is intentional - the task required the
report-300dpi.pdfnaming convention - The fixture supports OCR performance testing across page boundaries and longer documents
- Content sourced from public-domain test document generation (not a real government report, but realistic content)