<commit_before>'use strict';

const fs = require('fs');
const path = require('path');
const _ = require('lodash');
const db = require('../../../lib/schemes/');

let addonModelNames = [];

fs
    .readdirSync(__dirname)
    .filter(file => {
        return (file.indexOf('.') !== 0) && (file !== 'index.js');
    })
    .forEach(file => {
        const model = db.sequelize.import(path.join(__dirname, file));
        let name = _.upperFirst(model.name);
        db[name] = model;
        addonModelNames.push(name);
    });

Object.keys(db).forEach(modelName => {
    if ('associate' in db[modelName]) {
        db[modelName].associate(db);
    }
});

module.exports = db;
<commit_msg>change required db with stats db in evaluation schema index<commit_after>'use strict';

const fs = require('fs');
const path = require('path');
const _ = require('lodash');
const db = require('../../stats/schemas'); // depend on stats addon

let addonModelNames = [];

fs
    .readdirSync(__dirname)
    .filter(file => {
        return (file.indexOf('.') !== 0) && (file !== 'index.js');
    })
    .forEach(file => {
        const model = db.sequelize.import(path.join(__dirname, file));
        let name = _.upperFirst(model.name);
        db[name] = model;
        addonModelNames.push(name);
    });

Object.keys(db).forEach(modelName => {
    if ('associate' in db[modelName]) {
        db[modelName].associate(db);
    }
});

module.exports = db;

{'fraction_non_alphanumeric': 0.1890201528839472, 'fraction_numerical': 0.001389854065323141, 'mean_word_length': 2.9669421487603307, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '227494', 'n_tokens_mistral': 464, 'n_tokens_neox': 460, 'n_words': 97}