<commit_before>/*
 * stubble.js v0.0.1
 * http://yellowseed.org/stubble.js/
 *
 * Copyright 2011, <NAME>
 * Licensed under the MIT license.
 * http://www.opensource.org/licenses/mit-license.php
 *
 */

function stubble(arg) {
  arg = arg || {};
  if (typeof this !== 'undefined' && this !== null && !arg.target)
    arg.target = this;
  for (var name in arg.source)
  {
    var index_name = name.split('_', 1)[0]
    var index = arg.target[index_name];
    arg.target[name] = arg.source[name][index];
  }
  return arg.target;
}
<commit_msg>passing localization test.<commit_after>/*
 * stubble.js v0.0.1
 * http://yellowseed.org/stubble.js/
 *
 * Copyright 2011, <NAME>
 * Licensed under the MIT license.
 * http://www.opensource.org/licenses/mit-license.php
 *
 */

function stubble(arg) {
  arg = arg || {};
  if (typeof this !== 'undefined' && this !== null && !arg.target)
    arg.target = this;
  for (var sourceName in arg.source)
  {
    var parts = sourceName.split('_');
    var indexName = parts[0];
    var targetName = sourceName;
    if (arg.culture && parts.length > 2)
    {
      if (parts[2] != arg.culture) continue;
      targetName = parts[0] + '_' + parts[1];
    }
    var index = arg.target[indexName];
    arg.target[targetName] = arg.source[sourceName][index];
  }
  return arg.target;
}

{'fraction_non_alphanumeric': 0.17212490479817213, 'fraction_numerical': 0.015993907083015995, 'mean_word_length': 3.0306748466257667, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1147771', 'n_tokens_mistral': 473, 'n_tokens_neox': 457, 'n_words': 102}