<commit_before>import json
from htmlgen import Document, Division, Image

def ParseCollection(info):
    div = Division()
    div.add_css_classes('dataset')

    div.append(createPlainElement('path', info))
    div.append(createPlainElement('name', info))
    div.append(createPlainElement('license', info))
    div.append(createPlainElement('description', info))
    div.append(createPlainElement('acknowledgements', info))
    div.append(createTagElements(info))
    div.append(createFileElements(info))
    div.append(createThumbnailElements(info))
    div.append(createSoftwareElements(info))
    div.append(createCitationElements(info))

    return div

####################################################################################
####################################################################################
####################################################################################

def createPlainElement(type, info):
    div = Division()
    div.add_css_classes('dataset-' + type)

    div.append(info[type])

    return div

def createTagElements(info):
    div = Division()
    div.add_css_classes('dataset-tags')

    tags = info['tags']
    for t in tags:
        d = Division()
        d.add_css_classes('dataset-tag')
        d.id = t
        d.append(t)
        div.append(d)

    return div
<commit_msg>Renamed plain element to text element<commit_after>import json
from htmlgen import Document, Division, Image

def ParseCollection(info):
    div = Division()
    div.add_css_classes('dataset')

    div.append(createTextElement('path', info))
    div.append(createTextElement('name', info))
    div.append(createTextElement('license', info))
    div.append(createTextElement('description', info))
    div.append(createTextElement('acknowledgements', info))
    div.append(createTagElements(info))
    div.append(createFileElements(info))
    div.append(createThumbnailElements(info))
    div.append(createSoftwareElements(info))
    div.append(createCitationElements(info))
    div.append(createTextElement('notes', info))

    return div

####################################################################################
####################################################################################
####################################################################################

def createTextElement(type, info):
    div = Division()
    div.add_css_classes('dataset-' + type)

    div.append(info[type])

    return div

def createTagElements(info):
    div = Division()
    div.add_css_classes('dataset-tags')

    tags = info['tags']
    for t in tags:
        d = Division()
        d.add_css_classes('dataset-tag')
        d.id = t
        d.append(t)
        div.append(d)

    return div

{'fraction_non_alphanumeric': 0.2836416394631846, 'fraction_numerical': 0.0, 'mean_word_length': 4.855626326963907, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2532386', 'n_tokens_mistral': 738, 'n_tokens_neox': 700, 'n_words': 127}