<commit_before>'use strict';

var Learning = function (m) {
	this.module = m;
};

Learning.prototype.reply = function (source, text) {
	if (text.substr(0, 1) === '?') {
		if (typeof this.module.config.terms[text.substr(1)] === 'string') {
			source.reply(this.module.config.terms[text.substr(1)]);
		} else {
			source.mention('i\'m pretty sure i don\'t have this in my books');
		}
	}
};

Learning.prototype.replyAction = function (source, args, text) {
	return this.reply(source, text);
};

Learning.prototype.learnCommand = function (source, args) {
	var word = args.shift();
	var text = args.join(' ');<commit_msg>learn - derp, spaces<commit_after>'use strict';

//trim some strings
if (!String.prototype.trim) {
	String.prototype.trim = function () {
		return this.replace(/^\s+|\s+$/g, '');
	};
}

var Learning = function (m) {
	this.module = m;
};

Learning.prototype.reply = function (source, text) {
	if (text.substr(0, 1) === '?') {
		if (typeof this.module.config.terms[text.substr(1).trim()] === 'string') {
			source.reply(this.module.config.terms[text.substr(1).trim()]);
		} else {
			source.mention('i\'m pretty sure i don\'t have this in my books');
		}
	}
};

Learning.prototype.replyAction = function (source, args, text) {
	return this.reply(source, text);
};

Learning.prototype.learnCommand = function (source, args) {
	var word = args.shift();
	var text = args.join(' ');
{'fraction_non_alphanumeric': 0.1915351506456241, 'fraction_numerical': 0.005738880918220947, 'mean_word_length': 4.1098901098901095, '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': '757988', 'n_tokens_mistral': 514, 'n_tokens_neox': 480, 'n_words': 109}