TextClean Lab 001
Line-break repair test: spaces, paragraphs, and PDF wraps
A reproducible comparison of line-break replacement and PDF repair, including the cases that still need human review.
- Test source
- Four reproducible text fixtures
- Methods
- Space replacement and PDF repair
- Observed result
- PDF repair retained blank-line paragraphs
- Human check
- Lists, tables, code, and poetry
Download the test fixtureRun the line-break cleaner
Reproduced cases
Case 1
Hard-wrapped prose
- Source
- A paragraph copied from a narrow text column
- Setting
- Replace line breaks with spaces
Before
A sentence was wrapped across three narrow lines.
Observed output
A sentence was wrapped across three narrow lines.
Finding: The visual wrapping disappeared and the sentence remained readable.
Case 2
Blank-line paragraphs
- Source
- Two paragraphs separated by a blank line
- Setting
- Repair PDF paragraphs
Before
First paragraph wraps onto another line. Second paragraph stays separate.
Observed output
First paragraph wraps onto another line. Second paragraph stays separate.
Finding: Lines inside each block joined, while the blank-line boundary remained.
Case 3
End-of-line hyphenation
- Source
- A lowercase word split at the page edge
- Setting
- Repair PDF paragraphs and rejoin hyphenated words
Before
The para- graph continues here.
Observed output
The paragraph continues here.
Finding: The split word rejoined because the next line began with a lowercase letter.
Case 4
Structure that should not be flattened
- Source
- A short bulleted list
- Setting
- Replace line breaks with spaces
Before
- First item - Second item - Third item
Observed output
- First item - Second item - Third item
Finding: The setting produced one line, but it also removed the list structure. This result should not be used when the bullets matter.
What this test does not prove
- A newline does not reveal whether it is visual wrapping or intentional structure.
- Tables, code, poetry, addresses, and lists can depend on line position.
- The lowercase hyphen rule is conservative, but names and technical terms still need comparison with the source.
- The test covers TextClean output, not every PDF viewer or destination editor.
Method and maintenance
The fixtures were processed with the public TextClean engine and its recorded options. The expected outputs are covered by the project test suite.
Each case changes one relevant setting. No language model or server-side rewriting is used. The browser tool runs the same deterministic cleaning functions locally.
TextClean engineering maintains this test. TextClean is operated by Siddha Tantra Arts AB in Sweden. Material changes to the fixture, rule, or result update the date above.