<commit_before>// api console:

var _ = require('lodash');

var apidocs = [];

function buildApiConsole() {
    console.log(JSON.stringify(apidocs, null, '  '));
    var
        groups = {},
        n = 0;
    _.each(apidocs, function (doc) {
        n++;
        doc.id = 'api-' + n; // unique API ID
        var gs = groups[doc.group] || [];
        gs.push(doc);
        groups[doc.group] = gs;
    });
    console.log(JSON.stringify(groups, null, '  '));
    return groups;
}

function processApiDoc(group, method, url, doclines) {
    var
        ss = _.map(doclines.split('\n'), function (value) {
            return value.match(/^\s*\*?([\w\W]*)$/)[1].trim();
        }),
        doc = {
            group: group,
            name: '(no name)',
            description: '',
            method: method,
            url: url,
            params: [],
            result: {
                type: '',
                description: ''
            },
            errors: []
        },
        continue_description = true;
    _.each(ss, function (value) {
        var m, param, err;
        if (value.indexOf('@') === 0) {
            continue_description = false;
        }<commit_msg>remove debug info<commit_after>// api console:

var _ = require('lodash');

var apidocs = [];

function buildApiConsole() {
    //console.log(JSON.stringify(apidocs, null, '  '));
    var
        groups = {},
        n = 0;
    _.each(apidocs, function (doc) {
        n++;
        doc.id = 'api-' + n; // unique API ID
        var gs = groups[doc.group] || [];
        gs.push(doc);
        groups[doc.group] = gs;
    });
    //console.log(JSON.stringify(groups, null, '  '));
    return groups;
}

function processApiDoc(group, method, url, doclines) {
    var
        ss = _.map(doclines.split('\n'), function (value) {
            return value.match(/^\s*\*?([\w\W]*)$/)[1].trim();
        }),
        doc = {
            group: group,
            name: '(no name)',
            description: '',
            method: method,
            url: url,
            params: [],
            result: {
                type: '',
                description: ''
            },
            errors: []
        },
        continue_description = true;
    _.each(ss, function (value) {
        var m, param, err;
        if (value.indexOf('@') === 0) {
            continue_description = false;
        }
{'fraction_non_alphanumeric': 0.16904962153069805, 'fraction_numerical': 0.002523128679562658, 'mean_word_length': 1.5281615302869287, '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': '4066812', 'n_tokens_mistral': 739, 'n_tokens_neox': 709, 'n_words': 156}