Skip to content

The page reader writes two close columns of an unruled table as one cell #236

Description

@lemarier

The page reader (layout-v1) writes two columns of a table as one cell when the table draws no rule between them and the columns stand close together. The reader then gets two values in one cell and either splits them itself or keeps them together.

Evidence

Magnum's MS-PAE manual, page 58, the MS4024PAE and MS4448PAE columns:

| Models | MS4024PAE MS4448PAE |
| 5 sec surge power (real watts) | 5800 8500 |
| 30 sec surge power (real watts) | 5200 6000 |

Sol-Ark's 15K-2P-LV datasheet, page 2, its 240 V and 208 V columns:

| Nominal Frequency Range | Hz 55 - 65 | Peak Surge Power (30 min) W 13,000 11,260 |
| Max. Passthrough Current (Grid to Load) | A 200 | Peak Surge Power (10 s) W 24,000 20,800 |

In wave 2's readings the reader split Magnum's pairs by model correctly, and kept Sol-Ark's as one value, 13,000 11,260, which fails the Sol-Ark mapping test for the 15K's surges. In the recall comparison against main, 182 of 8,350 figures (2.2%) came back merged with another value.

Likely cause

cellsOf in apps/worker/src/layout.ts joins characters whose gap is at most 1.2 times the line's median letter width, or 3 points. Two columns set a few points apart fall under that, so they become one cell before columnsOf ever sees two columns. #183 is the same defect seen from the records.

Done when

A gap that lines up down the table, on several rows at the same place, splits cells there, while the spaces between words of one cell do not. The two tables above come out with a column each.

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