{# This template is also rendered with each entry (i.e., `rendered_templates`), and has access to all of the main entry-specific template values. All that is relevant here is the `analyses` variable. - Here we also display the lexicon entry stem along with the lemma. #} {%- import "lexicon.macros" as macros with context -%} {%- import "korp.macros" as korp with context -%}
{% if lexicon_entry %} {% set stem = lexicon_entry.xpath('./lg/stem/text()')|first %} {% else %} {% set stem = False %} {% endif %} {% for grouper, forms in analyses|groupby('lemma') %} {% if stem %} {% set group_with_stem = "%s (%s)"|format(grouper, stem) %} {% else %} {% set group_with_stem = grouper %} {% endif %} {% for lemmagroup, lemmafs in forms|groupby('pos') %} {% if current_pair_settings.show_korp_search %} {% if lemmagroup and grouper %}
{{ group_with_stem }} {{ korp.link_lemma(grouper) }}
{% else %}
{{ group_with_stem }}
{% endif %} {% else %}
{{ group_with_stem }}
{% endif %}
{% endfor %} {% endfor %}
{# vim: set ts=4 sw=4 tw=72 syntax=htmljinja : #}