<commit_before>"use strict";

var _ = require('underscore')._;

var eventSplitter = /\s+/;

var Node = function() {

  // new Node([opts, done])
  
  var opts, done;

  if ( arguments.length === 1 ) {
    if (typeof arguments[0] === 'function' ) {
      opts = {};          
      done = arguments[0];
    } else {
      opts = arguments[0];
    }

  }

  if ( arguments.length === 2 ) {
    opts = arguments[0];
    done = arguments[1];
  }

  this._counts = {};

  this.opts = opts || {};

  // var next = function(){
  //   if (done) {
  //     done();
  //   }
  // };

  this.initialize.call(this, opts, done);

  return this;

};

Node.prototype.initialize = function(opts, done) {

  // initialize requires and must execute callback
  process.nextTick(done);
};

Node.prototype.run = function(done) {
  // override this to start automatic processing

  // run requires and must execute callback
  done(false);
};

Node.prototype.stop = function(done) {
  // override this to finish up processing when instructed to stop

  // stop requires and must execute callback
  done(false);
};

Node.prototype.process = function(msg, done) {
  // override this to process an incoming message
  this.output(false, msg);

 // process requires and must execute callback
  done(false);
};

/*
 * output a message from the node
 * output ([outlet,] message [, done])
 */
Node.prototype.output = function() {

  var outlet;
  var message;
  var done;

  outlet = false;
  done = false;

  if ( arguments.length === 1 ) {
    message = arguments[0];
  }

  if ( arguments.length === 2 && typeof arguments[1] === 'function' ) {
    message = arguments[0];
    done = arguments[arguments];
  } else if ( arguments.length === 2  ) {
    outlet = arguments[0];
    message = arguments[1];
  }

  if ( arguments.length === 3 ) {<commit_msg>Getting correct argument<commit_after>"use strict";

var _ = require('underscore')._;

var eventSplitter = /\s+/;

var Node = function() {

  // new Node([opts, done])
  
  var opts, done;

  if ( arguments.length === 1 ) {
    if (typeof arguments[0] === 'function' ) {
      opts = {};          
      done = arguments[0];
    } else {
      opts = arguments[0];
    }

  }

  if ( arguments.length === 2 ) {
    opts = arguments[0];
    done = arguments[1];
  }

  this._counts = {};

  this.opts = opts || {};

  // var next = function(){
  //   if (done) {
  //     done();
  //   }
  // };

  this.initialize.call(this, opts, done);

  return this;

};

Node.prototype.initialize = function(opts, done) {

  // initialize requires and must execute callback
  process.nextTick(done);
};

Node.prototype.run = function(done) {
  // override this to start automatic processing

  // run requires and must execute callback
  done(false);
};

Node.prototype.stop = function(done) {
  // override this to finish up processing when instructed to stop

  // stop requires and must execute callback
  done(false);
};

Node.prototype.process = function(msg, done) {
  // override this to process an incoming message
  this.output(false, msg);

 // process requires and must execute callback
  done(false);
};

/*
 * output a message from the node
 * output ([outlet,] message [, done])
 */
Node.prototype.output = function() {

  var outlet;
  var message;
  var done;

  outlet = false;
  done = false;

  if ( arguments.length === 1 ) {
    message = arguments[0];
  }

  if ( arguments.length === 2 && typeof arguments[1] === 'function' ) {
    message = arguments[0];
    done = arguments[1];
  } else if ( arguments.length === 2  ) {
    outlet = arguments[0];
    message = arguments[1];
  }

  if ( arguments.length === 3 ) {
{'fraction_non_alphanumeric': 0.15275116342732, 'fraction_numerical': 0.009033670955379141, 'mean_word_length': 2.672361809045226, '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': '3979520', 'n_tokens_mistral': 1176, 'n_tokens_neox': 1114, 'n_words': 324}