{%- if type == 'frag' -%}
Fragment
{%- elif type == 'frag_sep' -%}
Fragment separator (non sentence break space)
{%- elif type == 'sent_sep' -%}
Sentence separator (sentence break space)
{%- elif type == 'frag_konj?' -%}
Konjunction
{%- else -%}
...
{%- endif -%}{# if type == 'frag' #}
{% endif %}{# if type is not None #}
{% for wp in word_pos -%}
{{ pos_tag(wp[0], wp[1]) }}
{# {{ pos_tag(wp[0], '{}_{}_{}'.format(wp[1], wp[2], wp[3])) }} #}
{%- endfor %}
{%- endmacro %}
Nr | Sentence |
---|---|
Input {{ nr }} | {{ paragraph | string | escape }} |
POS {{ nr }} | {{ pos_tag_seq(paragraph.pos) }} |
Segmentation {{ nr }} |
{% for line in tree %}
{% if line[0] == 'sep' %}
Sentence Break: {% for subline in line[1] %} {{ pos_tag_seq(subline[1], subline[0]) }} {% endfor %}{# for subline in line[1] #} {% else %}{# if line[0] == 'sep' #} Sentence {{ loop.index // 2 + 1 }}: {% for subline in line[1] %} {{ pos_tag_seq(subline[1], subline[0]) }} {% endfor %}{# for subline in line[1] #} {% endif %}{# if line[0] == 'sep' #} {% endfor %}{# for line in tree #} |
Result {{ nr }} | No segmentation possible/neccessary! |
Segment {{ nr }} - {{ loop.index }} | {{ sentence | string | escape }} |
POS | {{ pos_tag_seq(sentence.pos) }} |