<commit_before>/*
* DependencyChecker.js
* Written by <NAME> 11/19/16
*
* Checks that all required dependencies have been installed.
 */

"use strict";

var log = require('../log');

const dependencies = ['mysql', 'express', 'path', 'fs', 'cookie-parser', 'body-parser', 'nodemailer', 'nodemailer-smtp-transport'];

exports.checkDependencies = function() {
	log.info("~~~~~~~~~~~~~~~~Module Check~~~~~~~~~~~~~~~~~");
	var modulesYouNeed = [];
	for (var i in dependencies) {
		if (dependencies.hasOwnProperty(i)) {
            try {
                require(dependencies[i]);
                log.info("Cool, looks like the module " + dependencies[i] + " is already installed!")
            } catch (e) {
                log.warn("Uh oh, looks like you're missing the module " + dependencies[i]);
                modulesYouNeed.push(dependencies[i]);
            }
        }
	}
	
	logSummary(dependencies, modulesYouNeed);
	log.info("~~~~~~~~~~~~~~~End Module Check~~~~~~~~~~~~~~~~\n\n");
};

function logSummary(dependencyList, modulesNotInstalled) {
	log.info("~~~~~~~~~~~~~~~~~~~~Summary~~~~~~~~~~~~~~~~~~~");<commit_msg>Added new dependencies for the service<commit_after>/*
* DependencyChecker.js
* Written by <NAME> 11/19/16
*
* Checks that all required dependencies have been installed.
 */

"use strict";

var log = require('../log');

const dependencies = ['mysql', 'express', 'path', 'fs', 'cookie-parser', 'body-parser', 'nodemailer', 'nodemailer-smtp-transport', 'algorithmia', 'natural'];

exports.checkDependencies = function() {
	log.info("~~~~~~~~~~~~~~~~Module Check~~~~~~~~~~~~~~~~~");
	var modulesYouNeed = [];
	for (var i in dependencies) {
		if (dependencies.hasOwnProperty(i)) {
            try {
                require(dependencies[i]);
                log.info("Cool, looks like the module " + dependencies[i] + " is already installed!")
            } catch (e) {
                log.warn("Uh oh, looks like you're missing the module " + dependencies[i]);
                modulesYouNeed.push(dependencies[i]);
            }
        }
	}
	
	logSummary(dependencies, modulesYouNeed);
	log.info("~~~~~~~~~~~~~~~End Module Check~~~~~~~~~~~~~~~~\n\n");
};

function logSummary(dependencyList, modulesNotInstalled) {
	log.info("~~~~~~~~~~~~~~~~~~~~Summary~~~~~~~~~~~~~~~~~~~");
{'fraction_non_alphanumeric': 0.22416048844308767, 'fraction_numerical': 0.005233318796336677, 'mean_word_length': 3.5515873015873014, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '916663', 'n_tokens_mistral': 677, 'n_tokens_neox': 621, 'n_words': 154}