From c3e03b29ea502463563697370878b67bb40e606d Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Thu, 23 Apr 2026 19:01:37 +0900 Subject: [PATCH 1/2] docs: Add OCR accuracy evidence workflow document Creates a new document explaining the local-only workflow for generating OCR accuracy baselines. --- manual/workflow/ocr-accuracy-evidence.md | 39 ++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 manual/workflow/ocr-accuracy-evidence.md diff --git a/manual/workflow/ocr-accuracy-evidence.md b/manual/workflow/ocr-accuracy-evidence.md new file mode 100644 index 00000000..596f2e02 --- /dev/null +++ b/manual/workflow/ocr-accuracy-evidence.md @@ -0,0 +1,39 @@ +# Local-Only OCR Accuracy Evidence Workflow + +This document describes the process for measuring OCR accuracy against a local, private corpus of copyrighted PDF files. The goal is to generate redacted, structural metrics that can be used for equivalence testing without committing any sensitive or copyrighted material to the repository. + +## 1. Private Corpus Location + +The private PDF files are stored in the following directory: + +``` +/tests/copyrighted_fixtures_for_realities +``` + +**CRITICAL:** This directory is listed in `.gitignore`. Its contents **must never** be committed to the repository. It should contain a small, representative set of high-resolution PDF scans. + +## 2. Generating the Baseline + +The structural metrics are generated by the `tools/derive_private_baseline.py` script. This script runs the full `mineru` OCR pipeline on each PDF in the private corpus and aggregates the results into a single JSON file. + +### Command + +To run the harness, execute the following command from the repository root: + +```bash +uv run python tools/derive_private_baseline.py \ + --private-fixtures-dir /path/to/your/tests/copyrighted_fixtures_for_realities \ + tests/fixtures/private_page_baseline.json +``` + +This will overwrite the existing placeholder fixture with a new baseline derived from your local private files. + +**CRITICAL:** The output file `tests/fixtures/private_page_baseline.json` **must not** be committed to the repository if it contains data derived from the private corpus. The version in the repository should always be the generic, placeholder version. This workflow is for local-only validation. + +## 3. Current Status: BLOCKED + +As of 2026-04-23, the execution of this harness is **BLOCKED**. The underlying `mineru` OCR process hangs indefinitely when processing the private PDF files. + +This issue is tracked in **[#70](https://github.com/Seongho-Bae/newsdom-api/issues/70)**. + +Until this blocker is resolved, generating a new `private_page_baseline.json` from the local corpus is not possible. The harness script and tests have been merged so that the tooling is in place once the blocker is fixed. From 9a8ece59f253be7669c1911d45ec83829962c495 Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Thu, 23 Apr 2026 19:01:52 +0900 Subject: [PATCH 2/2] docs: Add new workflow document to nav Updates mkdocs.yml to include the new local OCR accuracy evidence workflow document in the side navigation. --- mkdocs.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index 8ab9d97d..e2489723 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -33,4 +33,7 @@ nav: - 시작하기: index.md - 설치 가이드: installation.md - 사용 방법 및 API: api-reference.md - - 개발 및 기여: development.md + - 개발 및 기여: + - development.md + - 워크플로우: + - workflow/ocr-accuracy-evidence.md