<commit_before>var path = require('path'),
    fs = require('fs'),
    exclude_dirs = ["node_modules", "bin", "doc", "test"],
    rRemoveExtension = /^(.*?)\.[^.]+$/,
    removeXMLSuffix = /^(.*).xml$/,
    backslashes = /\/g;

var config = function(args, callback) {

    if (args.length  <= 1) {
        var configFile = path.resolve(args[0] || "config.json");

        // test that we are in the public folder
        var dir = path.dirname(configFile);


        if (!args[0] && path.basename(dir) !== "public") {
            callback("config must be created within public directory");
        } else {
            var config = {};

            if (path.existsSync(configFile)) {<commit_msg>fixed regex for #19<commit_after>var path = require('path'),
    fs = require('fs'),
    exclude_dirs = ["node_modules", "bin", "doc", "test"],
    rRemoveExtension = /^(.*?)\.[^.]+$/,
    removeXMLSuffix = /^(.*).xml$/,
    backslashes = /\\/g;

var config = function(args, callback) {

    if (args.length  <= 1) {
        var configFile = path.resolve(args[0] || "config.json");

        // test that we are in the public folder
        var dir = path.dirname(configFile);


        if (!args[0] && path.basename(dir) !== "public") {
            callback("config must be created within public directory");
        } else {
            var config = {};

            if (path.existsSync(configFile)) {
{'fraction_non_alphanumeric': 0.18324982104509663, 'fraction_numerical': 0.00572655690765927, 'mean_word_length': 2.4014598540145986, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6221075', 'n_tokens_mistral': 441, 'n_tokens_neox': 419, 'n_words': 109}