<commit_before>BaseModel.includeModule("serialization", {

	prototype: {

		escapeHTML: function(x) {
			return String(x).replace(/&/g, "&amp;")
											.replace(/</g, "&lt;")
											.replace(/>/g, "&gt;")
											.replace(/"/g, "&quot;")
											.replace(/'/g, "&apos;");
		},

		serialize: function(type, options) {
			type = type || "queryString";
			options = options || {};
			var x = "";

			switch (type) {
				case "xml":
					x = this.toXML(options);
					break;
				case "json":
					x = this.toJSON(options);
					break;
				default:
					x = this.toQueryString(options);
					break;
			}

			return x;
		},

		toJSON: function(options) {<commit_msg>White space formatting<commit_after>BaseModel.includeModule("serialization", {

	prototype: {

		escapeHTML: function(x) {
			return String(x).replace(/&/g, "&amp;")
			                .replace(/</g, "&lt;")
			                .replace(/>/g, "&gt;")
			                .replace(/"/g, "&quot;")
			                .replace(/'/g, "&apos;");
		},

		serialize: function(type, options) {
			type = type || "queryString";
			options = options || {};
			var x = "";

			switch (type) {
				case "xml":
					x = this.toXML(options);
					break;
				case "json":
					x = this.toJSON(options);
					break;
				default:
					x = this.toQueryString(options);
					break;
			}

			return x;
		},

		toJSON: function(options) {
{'fraction_non_alphanumeric': 0.1900647948164147, 'fraction_numerical': 0.0, 'mean_word_length': 2.1096196868008947, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6074187', 'n_tokens_mistral': 642, 'n_tokens_neox': 472, 'n_words': 92}