<commit_before>from django import template
from django.utils.html import conditional_escape
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _

register = template.Library()


@register.filter
def extra_field_value(extra_field):
    if extra_field['value'] == '':
        return ''

    if extra_field['type'] == 'url':
        url = conditional_escape(extra_field['value'])
        output = \
            u'<a href="{0}" rel="nofollow">{0}</a>'.format(url)
        output = mark_safe(output)
    elif extra_field['type'] == 'yesno':
        if extra_field['value'] == 'yes':
            output = _(u'Yes')
        elif extra_field['type'] == 'no':
            output = _(u'No')
        else:
            output = _(u"Don't know")
    else:
        output = extra_field['value']
    return output<commit_msg>correct wrong key name in extra fields template tag<commit_after>from django import template
from django.utils.html import conditional_escape
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _

register = template.Library()


@register.filter
def extra_field_value(extra_field):
    if extra_field['value'] == '':
        return ''

    if extra_field['type'] == 'url':
        url = conditional_escape(extra_field['value'])
        output = \
            u'<a href="{0}" rel="nofollow">{0}</a>'.format(url)
        output = mark_safe(output)
    elif extra_field['type'] == 'yesno':
        if extra_field['value'] == 'yes':
            output = _(u'Yes')
        elif extra_field['value'] == 'no':
            output = _(u'No')
        else:
            output = _(u"Don't know")
    else:
        output = extra_field['value']
    return output
{'fraction_non_alphanumeric': 0.13737836290784203, 'fraction_numerical': 0.0022896393817973667, 'mean_word_length': 2.8758314855875833, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3096716', 'n_tokens_mistral': 523, 'n_tokens_neox': 510, 'n_words': 123}