<commit_before>#!/usr/bin/env iojs

var fs = require('fs'),
  sequoria = require('sequoria'),
  createBot = require('./lib').createBot;

if (require.main === module) {
  // this module is being directly run.
  var configFile = process.argv[2] || 'config.json';
  if (!configFile.startsWith('/')) {
    // hack: should use proper path joining package
    configFile = [
      process.cwd(),
      configFile
    ].join('/');
  }

  var config = JSON.parse(fs.readFileSync(configFile));
  var bot = createBot(config);
  bot.start();
}

module.exports = createBot;<commit_msg>Wrap main routine in function<commit_after>#!/usr/bin/env iojs

var fs = require('fs'),
  sequoria = require('sequoria'),
  createBot = require('./lib').createBot;

function main() {
  // this module is being directly run.
  var configFile = process.argv[2] || 'config.json';
  if (!configFile.startsWith('/')) {
    // hack: should use proper path joining package
    configFile = [
      process.cwd(),
      configFile
    ].join('/');
  }

  var config = JSON.parse(fs.readFileSync(configFile));
  var bot = createBot(config);
  bot.start();
}

if (require.main === module) {
  main();
}

module.exports = createBot;
{'fraction_non_alphanumeric': 0.16848281642917015, 'fraction_numerical': 0.0016764459346186086, 'mean_word_length': 3.4059040590405902, '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': '3411707', 'n_tokens_mistral': 383, 'n_tokens_neox': 379, 'n_words': 94}