<commit_before>fs = require 'fs'

fs.readFile 'tags/tags.json', 'utf8', (err,data)->
    if err
        return console.log err
    try
        obj = JSON.parse data
    catch e
        return console.log "invalid json"

    keys = []
    for key of obj
        keys.push key

    keys.sort()

    temp = {}
    for key in keys
        temp[key] = obj[key]

    console.log JSON.stringify temp, null, 2

<commit_msg>[minor] made the sort file output to tags/tags.json.sort<commit_after>fs = require 'fs'

fs.readFile 'tags/tags.json', 'utf8', (err,data)->
    if err
        return console.log err
    try
        obj = JSON.parse data
    catch e
        return console.log "invalid json"

    keys = []
    for key of obj
        keys.push key

    keys.sort()

    temp = {}
    for key in keys
        temp[key] = obj[key]

    fs.writeFile 'tags/tags.json.sort', (JSON.stringify temp, null, 2)


{'fraction_non_alphanumeric': 0.11457174638487208, 'fraction_numerical': 0.004449388209121246, 'mean_word_length': 2.0100334448160537, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1912098', 'n_tokens_mistral': 303, 'n_tokens_neox': 289, 'n_words': 92}