{% macro progress_section(title, breakdown) %}
{{ title }}
{% for name, count in breakdown.items()|sort(attribute='1', reverse=true) %}
{% if count > 0 or loop.index <= 3 %}
{{ name }}
{{ (count / (breakdown.values()|sum or 1) * 100)|int }}%
{% endif %}
{% endfor %}
{% endmacro %}
{{ progress_section('Emotion', emotion) }}
{{ progress_section('Language', language) }}
{{ progress_section('Domain', domain) }}