# Post-OCR cleanup demonstration

These are original synthetic strings, created on October 3, 2026 to isolate
text-normalization decisions. They are not OCR output, scanned-book ground
truth, customer documents, an OCR benchmark, or a test of BookTranslator.
The expected text and paragraph/line structure were defined by the author.

Download `fixture.mjs` and run it with Node.js (tested with 25.2.1):

```sh
node fixture.mjs > results.json
```

No dependencies, network calls, file uploads, or in-place file edits occur.
The JSON includes every input, intended reference, output, SHA-256, decision
reason, and patch offset (JavaScript UTF-16 code units, not bytes).
The checked-in `results.json` is the actual output from that command.

The deliberately blunt baseline deletes hyphen-plus-linefeed, turns remaining
linefeeds into spaces, and removes U+00AD. It is not any commercial cleaner.
The approved path applies ONLY the exact, authored replacements in the fixture.
It checks the whole input hash, refuses missing or non-unique matches, and
checks lossless undo. This tests patch application, not paragraph detection
or automated linguistic judgment. Empty patch lists explicitly preserve
structural or unreviewed cases. No real-world accuracy or speed is inferred.

For your own document, do not copy these approvals. Compare each candidate with
the original source page, decide its intended structure, and record that
decision. Keep the original file; a clean-looking reading copy does not replace
an archival transcription. Historical spelling and technical identifiers need
separate source-aware review.

Primary sources inspected:

- Unicode UAX #14 §5.4: https://unicode.org/reports/tr14/#SoftHyphen
- Duden, Aufgabe (Auf|ga|be): https://www.duden.de/rechtschreibung/Aufgabe
- Office québécois de la langue française, points de suspension:
  https://vitrinelinguistique.oqlf.gouv.qc.ca/index.php?id=23396

The French sentences, English prose/verse, and code are original examples,
not quotations from those sources. The ellipsis case's paragraph boundary is
author-defined, not derived from a punctuation rule. We did not benchmark any
third-party cleaner, OCR engine, language model, or translation service.
