<commit_before>/**
 * Core bosco libraries
 */

var events = require('events');
var _ = require('lodash');
var util = require('util');
var fs = require('fs');
var path = require('path');
var progress = require('progress');
var Table = require('cli-table');
var prompt = require('prompt');
var async = require('async');
var mkdirp = require('mkdirp');
var knox = require('knox');
var request = require('request');
var sf = require('sf');

prompt.message = 'Bosco'.green;

function Bosco() {}
util.inherits(Bosco, events.EventEmitter);
module.exports = Bosco;

Bosco.prototype.init = function(options) {

    var self = this;

    self._defaults = {
        _defaultConfig: [__dirname, 'config/bosco.json'].join('/')
    };

    self.options = _.defaults(_.clone(options), self._defaults);
    self.options.configPath = options.configPath ? path.resolve(options.configPath) : [self.findWorkspace(), '.bosco'].join('/');
    self.options.workspace = options.configPath ? path.resolve('..') : path.resolve(self.options.configPath, '..');
    self.options.configFile = [self.options.configPath, 'bosco.json'].join('/');
    self.options.envConfigFile = [self.options.configPath, self.options.environment + '.json'].join('/');
    self.options.defaultsConfigFile = [self.options.configPath, 'defaults.json'].join('/');
    self.options.cpus = require('os').cpus().length;
    self.options.inService = false;

    self.config = require('nconf');
    self.prompt = prompt;
    self.progress = progress;

    events.EventEmitter.call(this);

    self.run();<commit_msg>Fix bug with config that broke jenkins<commit_after>/**
 * Core bosco libraries
 */

var events = require('events');
var _ = require('lodash');
var util = require('util');
var fs = require('fs');
var path = require('path');
var progress = require('progress');
var Table = require('cli-table');
var prompt = require('prompt');
var async = require('async');
var mkdirp = require('mkdirp');
var knox = require('knox');
var request = require('request');
var sf = require('sf');

prompt.message = 'Bosco'.green;

function Bosco() {}
util.inherits(Bosco, events.EventEmitter);
module.exports = Bosco;

Bosco.prototype.init = function(options) {

    var self = this;

    self._defaults = {
        _defaultConfig: [__dirname, 'config/bosco.json'].join('/')
    };

    self.options = _.defaults(_.clone(options), self._defaults);

    self.options.configPath = options.configPath ? path.resolve(options.configPath) : [self.findWorkspace(), '.bosco'].join('/');
    self.options.workspace = options.configPath ? path.resolve('..') : path.resolve(self.options.configPath, '..');
    self.options.configFile = options.configFile ? path.resolve(options.configFile) : [self.options.configPath, 'bosco.json'].join('/');

    self.options.envConfigFile = [self.options.configPath, self.options.environment + '.json'].join('/');
    self.options.defaultsConfigFile = [self.options.configPath, 'defaults.json'].join('/');
    self.options.cpus = require('os').cpus().length;
    self.options.inService = false;

    self.config = require('nconf');
    self.prompt = prompt;
    self.progress = progress;

    events.EventEmitter.call(this);

    self.run();
{'fraction_non_alphanumeric': 0.18326568841710897, 'fraction_numerical': 0.0, 'mean_word_length': 4.34, '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': '28368', 'n_tokens_mistral': 996, 'n_tokens_neox': 971, 'n_words': 193}