Gabriel's picture
added some chnages for xml
4c85050
raw
history blame
No virus
1.68 kB
<?xml version="1.0" encoding="UTF-8"?>
<PcGts xmlns="http://schema.primaresearch.org/PAGE/gts/pagecontent/2013-07-15" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schema.primaresearch.org/PAGE/gts/pagecontent/2013-07-15 http://schema.primaresearch.org/PAGE/gts/pagecontent/2013-07-15/pagecontent.xsd">
<Metadata>
<Creator>Swedish National Archives</Creator>
<Created>{{ created }}</Created>
</Metadata>
<Page imageFilename="{{ imageFilename }}" imageWidth="{{ imageWidth }}" imageHeight="{{ imageHeight }}">
{% for textRegion in textRegions %}
<TextRegion id="{{ textRegion.id }}" custom="readingOrder {index:{{ loop.index0 }};}">
<Coords points="{% for point in textRegion.boundary %}{{ point|join(',') }}{% if not loop.last %} {% endif %}{% endfor %}"/>
{% for textLine in textRegion.textLines %}
<TextLine id="{{ textLine.id }}" custom="readingOrder {index:{{ loop.index0 }};}">
{% if textLine.boundary %}
<Coords points="{% for point in textLine.boundary %}{{ point|join(',') }}{% if not loop.last %} {% endif %}{% endfor %}"/>
{% endif %}
{% if textLine.baseline %}
<Baseline points="{% for point in textLine.baseline %}{{ point|join(',') }}{% if not loop.last %} {% endif %}{% endfor %}"/>
{% endif %}
{% if textLine.unicode %}
<TextEquiv>
<Unicode>{{ textLine.unicode }}</Unicode>
</TextEquiv>
{% endif %}
{% if textLine.pred_score %}
<PredScore pred_score="{{ textLine.pred_score }}"/>
{% endif %}
</TextLine>
{% endfor %}
</TextRegion>
{% endfor %}
</Page>
</PcGts>