38 lines
1.2 KiB
Markdown
38 lines
1.2 KiB
Markdown
# Step 1: paragraph-stitching
|
|
|
|
## Read First
|
|
- /AGENTS.md
|
|
- /PLAN.md
|
|
- /PROGRESS.md
|
|
- /docs/HARNESS.md
|
|
- /docs/IMPLEMENTATION_PLAN.md
|
|
- /docs/CONVERSION_POLICY.md
|
|
- /phases/4-semantic-enrichment/step0.md
|
|
|
|
## Task
|
|
Implement paragraph stitching for line-fragmented PDF text blocks.
|
|
|
|
Handle continuation lines and hyphenated line breaks while preserving likely compound words or identifiers when confidence is low.
|
|
|
|
## Sprint Contract
|
|
- Done means: paragraph stitching turns line fragments into coherent paragraph blocks with focused tests.
|
|
- Hard thresholds: hyphen joins are tested; low-confidence hyphen cases are preserved; list items and headings are not merged into paragraphs.
|
|
- Files owned: `src/pdftomd/enrichment.py`, tests, `PROGRESS.md`, phase index.
|
|
- Dependencies: Step 0 checks and normalized block model.
|
|
|
|
## Acceptance Criteria
|
|
```powershell
|
|
python scripts\validate_workspace.py
|
|
.\venv\python.exe -m pytest tests
|
|
```
|
|
|
|
## Verification
|
|
1. Run the acceptance commands.
|
|
2. Confirm Korean and English text fixtures remain stable.
|
|
3. Update `PROGRESS.md` and this phase index.
|
|
|
|
## Do Not
|
|
- Do not rely only on punctuation rules when bounding-box hints exist.
|
|
- Do not merge across tables, figures, or formulas.
|
|
- Do not modify source PDF files.
|