<commit_before>{% extends "site_base.html" %}
{# template to browse list of keywords or topics #}
{# OR browse documents by a single keyword or topic #}

{% block page-subtitle %}| {{ label }}{% if term %} | {{ term }}{% endif %}{% endblock %}

{% block content %}

<div class="container">
    <h1>{{ label }}{% if term %} : {{ term }}{% endif %}</h1>

    {% if term %} {# display resources matching requested term #}
        {% include 'ddi/snippets/search_results.html' %}
    {% else %} {# display list of keywords or topics #}
    <ul>
        {% for t in results.object_list %}
        <li><a href="?{{ fltr }}={{ t }}">{{ t }}</a></li>
        {% endfor %}
    </ul>
    {% endif %}
</div>
{% endblock %}<commit_msg>update browse page to display label and count for topics [#60543676]<commit_after>{% extends "site_base.html" %}
{# template to browse list of keywords or topics #}
{# OR browse documents by a single keyword or topic #}
{% load humanize %}

{% block page-subtitle %}| {{ label }}{% if term %} | {{ term }}{% endif %}{% endblock %}

{% block content %}

<div class="container">
    <h1>{{ label }}{% if term %} : {{ term }}{% endif %}</h1>

    {% if term %} {# display resources matching requested term #}
        {% include 'ddi/snippets/search_results.html' %}
    {% else %} {# display list of keywords or topics #}
    <ul>
        {% for t in results.object_list %}
        {# t.text / t.count for topics #}
        {% if t.text and t.count %}
        <li><a href="?{{ fltr }}={{ t.text|urlencode }}">{{ t.text }}</a> ({{ t.count|intcomma }})</li>
        {% else %} {# value only for keywords #}
        <li><a href="?{{ fltr }}={{ t }}">{{ t }}</a></li>
        {% endif %}
        {% endfor %}
    </ul>
    {% endif %}
</div>
{% endblock %}
{'fraction_non_alphanumeric': 0.21218961625282168, 'fraction_numerical': 0.006772009029345372, 'mean_word_length': 2.7965738758029977, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2264508', 'n_tokens_mistral': 643, 'n_tokens_neox': 567, 'n_words': 176}