Skip to content

Record Schema 2.0 update of `atrium_document`

Choose a tag to compare

@github-actions github-actions released this 28 Nov 11:52
· 12 commits to main since this release
Immutable release. Only release title and notes can be modified.

Major release on top of v1.4.7-beta: the converter writes docproc instead of the record, and the record moves to schema 2.0 (atrium-project#84), so the major version moves.

Changed

  • docproc in place of the record: the layout is written as atr/docproc-json (the ATR's schema with block lines[] and the page verdict; --docproc-out, and /reformat returns it). ocr-postprocess builds the record.
  • Nothing is refused. A page with an earlier OCR layer, a text layer that does not decode, or no text goes to the ATR (needsAtr). metadata.routing.pages[] lists every page with page, route and text_layer.
  • Two workflows (#9):
    • Visual: a PDF on its own pages; a DOCX, DOC, ODT or RTF as its own text, placed on the pages of a LibreOffice rendering.
    • Textual: ODS, XLSX, XLS, TXT, CSV, TSV and JSON are extracted as they are and never routed to the ATR. A spreadsheet keeps every non-empty cell as the sheet displays it.
  • An office page holding only a picture goes to the ATR, as a PDF page does (#84 decision 3): no line outside its header and footer, plus a picture. A page with only a table, a chart or a text box keeps its text.
  • Each picture is a figure block with its bbox and no lines, content or imageRef (#84 decision 6):
    • a DOCX drawing is boxed on the rendering, and one not found keeps no box (figures_without_box in the paradata);
    • the proposal schema no longer requires imageRef, and its ask 14 (graphics, tables in routing) is withdrawn;
    • with the forced pages, the pages with figure blocks are the ones page-classification classifies (#84 decision 4).
  • The rendered PDF is named for every office document as rendered-pdf, stored: false (#84 decision 5). /reformat returns it as rendered_pdf, and --rendered-out writes it, when the ATR or page-classification reads it. The rendered form field is gone.
  • One coordinate space: every box is on the displayed page (CropBox, after /Rotate, in pt × UserUnit). A PDF page without text whose rendering shows nothing is routed empty.
  • Decode verdicts are the line flags decode:garbled and decode:inverted (were Garbage, Inverted). Words that lose letters are left to scoring.
  • A DOCX is read in full from its XML, including equations, SmartArt node text and chart text.
  • Paradata 3.0 name the original, the seed and the docproc by SHA-512, and config holds settings only (#84 decision 1c). bench_compare.py names its files as entries.
  • /describe (parked during the pilot) calls no other tool: the page-classification and ocr-postprocess calls and their settings are gone.
  • CI runs on pull requests and releases only (atrium-project#40). The hub's workflows are pinned to ff0a8ea.

Compatibility

  • Gone:
    • ocr_text_layer, OCR_LAYER_DOCUMENT_SHARE, ATRIUM_TEXT_INGEST_PDF_OBJECT_CAP and RENDER_TEXT_COVERAGE;
    • --docx-page-breaks and the rendered form field;
    • /describe's stage settings (PAGE_CLASSIFICATION_URL, OCR_POSTPROCESS_URL and the rest).
  • Images stay 415, and an XLSX now needs LibreOffice.
  • The samples are synthetic documents; docproc/light/, docproc/docling/ and reports/ are this version's.

Also included, parked during the pilot: decisions/document_type.v3.json and its offline tools (#8, atrium-project#83). They are not run by the service.

Images this release certifies (images.json, atrium-project#81):

  • ghcr.io/ufal/atrium-digital-convert-digital:2.0.0-beta = sha256:09a05798e976f374a304f65b6367d6476726fd033fee225fb4c1cc21613b3eb5
  • ghcr.io/ufal/atrium-digital-convert-api:2.0.0-beta = sha256:44803761643022e4a0ce2fc9924c88d6a8ed0faa5332f1553a7e8a19092f259b

What's Changed

New Contributors

  • @K4TEL made their first contribution in #10

Full Changelog: v1.4.7-beta...v2.0.0-beta