diff --git a/kraken/serialization.py b/kraken/serialization.py index fb2b8ef69..cb335a71b 100644 --- a/kraken/serialization.py +++ b/kraken/serialization.py @@ -163,7 +163,7 @@ def serialize(results: 'Segmentation', # set field to indicate the availability of baseline segmentation in # addition to bounding boxes - line = {'index': idx, + line = {'id': record.id, 'bbox': max_bbox([record.boundary]) if record.type == 'baselines' else record.bbox, 'cuts': record.cuts, 'confidences': record.confidences, diff --git a/kraken/templates/alto b/kraken/templates/alto index f018d2f5b..b3ab3fc4b 100644 --- a/kraken/templates/alto +++ b/kraken/templates/alto @@ -3,7 +3,7 @@ 'postprocessing': 'postOperation'} %} {%+ macro render_line(page, line) +%} - + {% if line.boundary %} @@ -107,7 +107,7 @@ {% if loop.previtem and loop.previtem.type == 'line' %} {% endif %} - + diff --git a/kraken/templates/pagexml b/kraken/templates/pagexml index 6274eaf64..daea1ac00 100644 --- a/kraken/templates/pagexml +++ b/kraken/templates/pagexml @@ -1,5 +1,5 @@ {%+ macro render_line(line) +%} - + {% if line.boundary %} {% endif %} @@ -38,7 +38,7 @@ {% if loop.previtem and loop.previtem.type == 'line' %} {% endif %} - + {%- for line in entity.lines -%} {{ render_line(line) }}