<commit_before>CommonLogger = require 'common-logger'
ain2 = require 'ain2'
fs = require 'fs'

config = {}
logFile = undefined
exports.setConfig = (config_) ->
    config = Object.clone(config_)
    # Translate user-passed string to level index
    config.level = Math.max(0, CommonLogger.levels.indexOf config_.level)

    if config_.file<commit_msg>logger: typo<commit_after>CommonLogger = require 'common-logger'
ain2 = require 'ain2'
fs = require 'fs'

config = {}
logFile = undefined
exports.setConfig = (config_) ->
    config = Object.create(config_)
    # Translate user-passed string to level index
    config.level = Math.max(0, CommonLogger.levels.indexOf config_.level)

    if config_.file
{'fraction_non_alphanumeric': 0.11253561253561253, 'fraction_numerical': 0.008547008547008548, 'mean_word_length': 4.169117647058823, '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': '64837', 'n_tokens_mistral': 216, 'n_tokens_neox': 209, 'n_words': 56}