Skip to content

API-CLI parity fixes

Choose a tag to compare

@github-actions github-actions released this 28 Oct 16:27
· 18 commits to master since this release
Immutable release. Only release title and notes can be modified.

v1.14.0-beta: the same lines and page score from the command line and the service

What changed (atrium-project#72)

  • Both sides now keep blank lines as Empty lines, numbered with the rest, so the service's line_num matches the batch's for the same page.
    • In ALTO, blank lines are the paragraph breaks that the text extraction writes.
    • In plain text and documents, blank lines are kept only with [TEXT_INGEST] KEEP_BLANK_LINES = true. The service now reads this setting too. The default stays false.
  • reading_order=alto now reads the page with alto-tools, as --method alto-tools does: a blank line before each text block, and a hyphenated line joined to the next. alto_tools.py (Apache-2.0) is now part of the service image and bundle.
  • A page's quality_score from /process, /score_record and score_record.py is now the mean of its Clear and Noisy lines, as in the batch page statistics. It used to include Trash lines.
  • docs/usage.md explains what counts as a blank line.

Compatibility

  • The API fields are unchanged. The spec differs only in its version and two descriptions.
  • An ALTO upload's cleaned_lines now includes Empty lines, so the lines after them get higher line_num values. A record written by the service gets those rows too.
  • Plain-text and document uploads give the same lines as before unless KEEP_BLANK_LINES is set.
  • A page's quality_score changes if the page has Trash lines. A page with only Trash lines now has no score.
  • With reading_order=alto, an ALTO file in a namespace that alto-tools does not know now gets a 422.

Upgrade notes

  • Pin 1.14.0-beta.
  • A client that expects only lines with text should skip lines whose category is Empty.

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

  • ghcr.io/ufal/atrium-ocr-postprocess:1.14.0-beta = sha256:a2f00af5d09b439c9ef9b031297e46ed540ef9c11ac4426ac5226ee395b32d8a
  • ghcr.io/ufal/atrium-ocr-postprocess-api:1.14.0-beta = sha256:880b025c57ada6194dcd109ae4a2ad6b75b013f9adf7d79a7c1dca495154a4ce

Full Changelog: v1.13.1-beta...v1.14.0-beta