Skip to content

The page reader repeats a line into every column of a ruled grid it crosses #230

Description

@lemarier

The page reader (layout-v1, #216) writes a line of prose into every column of a ruled grid it crosses, and interleaves two overlapping lines letter by letter. On three of wave 2's documents most of the conversion is this repetition, and the text reader pays for every window of it.

Evidence

Energizer's Homepower installation manual converts to 931,504 characters where toMarkdown gave 65,746: 13 windows became 172. 80% of the new text is in lines over 2,000 characters. The longest is 23,646 characters and 106 cells, each holding the same sentence:

| The installer shall identify a suitable location for the Energizer Homepower HP-6 Series system, maintain | The installer shall identify a suitable location for the Energizer Homepower HP-6 Series system, maintain | …

and overlapping lines come out interleaved:

| 43HPePr-f6oSrm uannitc ise cdoen-rsaitdinegre edx ap escutbe-dsy isnt eexmt roefm the ea Mmbaiien nUt nteitm …
Document Windows before After In lines over 2,000 characters
Energizer Homepower installation manual 13 172 80%
Magnum MPXD extension kit manual 21 204 71%
EG4 6000XP system wiring diagrams 10 72 63%

The other 55 documents wave 2 read past sixty windows are under 50%. Across 120 sampled documents the converter costs ×1.35 in windows, so this is confined, but on these three it is most of what was read.

Likely cause

A cell whose text crosses one of the page's ruled lines is taken to belong to both columns, which is what a merged cell is (rulesOn and gridOf in apps/worker/src/layout.ts). On a page whose rules are a drawing, a wiring diagram or a form rather than a table, every line of prose crosses them all and is repeated into each. The interleaving looks like two runs of text at the same angle and height grouped into one line by vertical overlap.

Done when

A page whose rules do not form a table is written as prose, and a line is never repeated into more columns than a table on that page has. These three documents convert to roughly the size of their text.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions