File size: 1,684 Bytes
5ebeb73
 
 
 
 
 
 
 
 
 
 
4c85050
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5ebeb73
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?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>