{# This is the paradigm template for North Sámi. * Nouns: Display everything in the paradigm in a definition list * Verbs: TBD, but can probably copy from sme when ready? minus dual #} {%- set first_l = lexicon_entry|xpath('lg/l')|first %} {% set lemma = first_l|text %} {% set pos = first_l|xpath('@pos')|first %} {% set pos_type = first_l|xpath('@type')|first %} {% set has_forms = paradigm and paradigm|length > 0 -%} {% set paradigm_exists = paradigm|length > 0 %} {%- if pos|upper == 'V' %} {% set verbs = true %} {% set present_verbs = paradigm|by_tagset_value("tense", "Prs") |without_tagset("negation") |group_by_tag %} {% set preterite_verbs = paradigm|by_tagset_value("tense", "Prt1") |without_tagset("negation") |group_by_tag %} {% set nonfinite_forms = paradigm|by_tagset("nonfinite_paradigm") %} {# As long as the paradigm files are in order, this will zip accurately. If not we need to manually select each form and display it. #} {# Use izip_longest to fill in the extra blanks spaces when one list ends first #} {% set zipped_verbs = izip_longest(present_verbs, preterite_verbs, fillvalue='-')|list %} {% set paradigm_exists = zipped_verbs|length > 0 or nonfinite_forms|length > 0 %} {# strip some parts of the tags that we don't need #} {% set prs_text = "Prs"|tagfilter(_from, _to) %} {% set prt1_text = "Prt1"|tagfilter(_from, _to) %} {% set nonfinite_header = False %} {# we'll know this isn't just a normal verb with a couple negative forms because there are 9 #} {% macro clean_tag(tag_input) -%} {{ tag_input|remove_by_tagset('invisible_in_verb_paradigms') |tagfilter(_from, _to) }} {%- endmacro %} {% macro clean_nonf_tag(tag_input) -%} {{ tag_input|remove_by_tagset('invisible_in_verb_nonfinite_paradigms') |tagfilter(_from, _to) }} {%- endmacro %} {%- endif %} {%- if pos|upper == 'N' or pos|upper == 'NUM' or pos|upper == 'A' and pos_type != 'Prop' %} {% set sg_forms = paradigm|by_tagset_value("number", "Sg")|group_by_tag %} {% set pl_forms = paradigm|by_tagset_value("number", "Pl")|group_by_tag %} {# Use izip_longest to fill in the extra blanks spaces when one list ends first #} {% set zipped_numbers = izip_longest(sg_forms, pl_forms, fillvalue='-')|list %} {% set paradigm_exists = zipped_numbers|length > 0 %} {% set numberless_forms = paradigm|by_tagset("nouns_null_number") %} {% set sg_text = "Sg"|tagfilter(_from, _to) %} {% set pl_text = "Pl"|tagfilter(_from, _to) %} {% if pos|upper == 'N' %} {% set pos_text = pos|upper|tagfilter(_from, _to) %} {% elif pos|upper == 'NUM' %} {% set pos_text = 'Num'|tagfilter(_from, _to) %} {% elif pos|upper == 'A' %} {% set pos_text = 'A'|tagfilter(_from, _to) %} {% endif %} {% macro clean_tag(tag_input) %} {{ tag_input|remove_by_tagset('invisible_in_noun_paradigms') |tagfilter(_from, _to) }} {% endmacro %} {% endif -%} {%- if pos|upper == 'N' and pos_type == 'Prop' %} {% macro clean_tag(tag_input) %} {{ tag_input|remove_by_tagset('invisible_in_noun_paradigms') |tagfilter(_from, _to) }} {% endmacro %} {% endif -%} {%- if pos|upper == 'A' %} {% macro clean_tag(tag_input) -%} {{ tag_input|remove_by_tagset('invisible_in_adj_paradigms') |tagfilter(_from, _to) }} {%- endmacro %} {%- endif %} {%- if pos|upper == 'PRON' %} {% macro clean_tag(tag_input) -%} {{ tag_input|remove_by_tagset('invisible_in_pron_paradigms') |tagfilter(_from, _to) }} {%- endmacro %} {%- endif %} {%- macro full_paradigm_link() %} {%- trans -%}Full paradigm{%- endtrans -%} → {% endmacro -%} {%- if has_forms %} {%- if pos|upper == 'V' %} {% if paradigm_exists %} {% if zipped_verbs %}
{{ prs_text }} (течи) | {{ prt1_text }} (исяк) | |||
---|---|---|---|---|
{{ tag_display }} | {% if present_forms and present_forms != '-' %}{{ present_forms|join(' ', attribute='form') }} |
{% else %}
— | {% endif %} {% if preterite_forms and preterite_forms != '-' %}{{ preterite_forms|join(' ', attribute='form') }} |
{% else %}
— | {% endif %}
{{ clean_tag(form.tag) }} | {% endif %} {% if form.form %}{{ form.form }} | {% else %}? | {% endif %}
{{ sg_text }} | {{ pl_text }} | |||
---|---|---|---|---|
{{ tag_display }} | {% if sgs and sgs != '-' %}{{ sgs|join(' ', attribute='form') }} |
{% else %}
— | {% endif %} {% if pls and pls != '-' %}{{ pls|join(' ', attribute='form') }} |
{% else %}
— | {% endif %}
{{ clean_tag(form.tag) }} | {% endif %} {% if form.form %}{{ form.form }} | {% else %}? | {% endif %}