<commit_before>
(function(swiftSet) { 
'use strict';
function version() { return 'swiftSet v0.9.14 MIT License © 2014 <NAME> http://github.com/jabney/swiftSet'; }

// ---------------------------------------------------------------
// Set and Histogram - the Histogram is the backing object for
// Set, but it can also be used to record frequencies of discrete
// values in arrays, strings, and objects; the Set object,
// which is based upon Histogram, stores unique items and can
// process even large arrays of items very fast.
// ---------------------------------------------------------------
// http://github.com/jabney/swiftSet
// ---------------------------------------------------------------
var

// Shortcuts
slice = Array.prototype.slice,

// Encode object type for key generation.
encodeObjType = (function() {

  var toString = Object.prototype.toString,

  // Return the type of built-in objects via toString.
  typeOf = (function() {
    var reType = /\[object (\w+)\]/; 
    return function(obj) {
      return reType.exec(toString.call(obj))[1];
    };
  })(),

  // A list of built-in types.
  types = ['Null','Undefined','Array','Boolean','Number','String','Object',
    'Function','Date','Error','RegExp','Arguments','Math','JSON'],

  // Build dictionary for converting type strings to unique codes.
  codes = Object.create(null);
  types.forEach(function(type, index) {
    codes[type] = index;
  });

  // Encode an object's type as a unique number. If the type code
  // is not defined, return the type name.
  return function encodeObjType(obj) {
    var type = typeOf(obj);
    return codes[type] || type;
  }

})();

// Wrap a built-in type and give it a unique key generator.
function Wrapper(obj, toStr) {
  this.item = obj;
  this.toString = toStr ? toStr : function() {
    return '(' + obj + ':' + encodeObjType(obj) + ')';<commit_msg>Fix encodeObjType when passing null<commit_after>
(function(swiftSet) { 
'use strict';
function version() { return 'swiftSet v0.9.14 MIT License © 2014 <NAME> http://github.com/jabney/swiftSet'; }

// ---------------------------------------------------------------
// Set and Histogram - the Histogram is the backing object for
// Set, but it can also be used to record frequencies of discrete
// values in arrays, strings, and objects; the Set object,
// which is based upon Histogram, stores unique items and can
// process even large arrays of items very fast.
// ---------------------------------------------------------------
// http://github.com/jabney/swiftSet
// ---------------------------------------------------------------
var

// Shortcuts
slice = Array.prototype.slice,

// Encode object type for key generation.
encodeObjType = (function() {

  var toString = Object.prototype.toString,

  // Return the type of built-in objects via toString.
  typeOf = (function() {
    var reType = /\[object (\w+)\]/; 
    return function(obj) {
      return reType.exec(toString.call(obj))[1];
    };
  })(),

  // A list of built-in types.
  types = ['Null','Undefined','Array','Boolean','Number','String','Object',
    'Function','Date','Error','RegExp','Arguments','Math','JSON'],

  // Build dictionary for converting type strings to unique codes.
  codes = Object.create(null);
  types.forEach(function(type, index) {
    codes[type] = index;
  });

  // Encode an object's type as a unique number. If the type code
  // is not defined, return the type name.
  return function encodeObjType(obj) {
    var type = typeOf(obj),
    code = codes[type];
    return code === undefined ? type : code;
  }

})();

// Wrap a built-in type and give it a unique key generator.
function Wrapper(obj, toStr) {
  this.item = obj;
  this.toString = toStr ? toStr : function() {
    return '(' + obj + ':' + encodeObjType(obj) + ')';
{'fraction_non_alphanumeric': 0.23174268389137886, 'fraction_numerical': 0.004745583970471922, 'mean_word_length': 2.2706896551724136, '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': '1486473', 'n_tokens_mistral': 1064, 'n_tokens_neox': 1027, 'n_words': 352}