<commit_before>var TesseractClient = require('./TesseractClient.js');

// Unless we are told otherwise there default port the server runs on is...
exports.defaultPort = 3679;

// Try to connect to the server. If the connection is successful then a
// TesseractClient will be passed back - otherwise you will receive the error.
exports.connect = function (host, callback) {
	// A `null` host means we want to connect to `localhost`.
	if (null == host) {
		host = 'localhost';
	}

	// Likewise we need to make sure we have the correct port number.
	var server = host.split(':');
	if (server.length == 1) {
		server.push(exports.defaultPort);
	}

	// Create the client socket and connect to the server.
	var socket = require('net').Socket();
	socket.connect(server[1], server[0], function () {
		callback(null, new TesseractClient(socket));
	});
<commit_msg>simple formatting<commit_after>var TesseractClient = require('./TesseractClient.js');

// Unless we are told otherwise there default port the server runs on is...
exports.defaultPort = 3679;

// Try to connect to the server. If the connection is successful then a
// TesseractClient will be passed back - otherwise you will receive the error.
exports.connect = function (host, callback) {
	
	// A `null` host means we want to connect to `localhost`.
	if (null == host) {
		host = 'localhost';
	}

	// Likewise we need to make sure we have the correct port number.
	var server = host.split(':');
	if (server.length == 1) {
		server.push(exports.defaultPort);
	}

	// Create the client socket and connect to the server.
	var socket = require('net').Socket();
	socket.connect(server[1], server[0], function () {
		callback(null, new TesseractClient(socket));
	});

{'fraction_non_alphanumeric': 0.12237762237762238, 'fraction_numerical': 0.008158508158508158, 'mean_word_length': 3.877840909090909, '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': '2528326', 'n_tokens_mistral': 511, 'n_tokens_neox': 489, 'n_words': 197}