{% for line in page.lines %}
{% if line.recognition %}
{% for segment in line.recognition %}
{% endfor %}
{% else %}
{% for line in page.lines %}
{% endfor %}
{% endif %}
{% endfor %}
{% for line in page.lines %}
{% if line.recognition %}
{% for segment in line.recognition %}
{{ segment.text }}
{% endfor %}