<commit_before>#!/usr/bin/env node
'use strict';

var raw     = process.argv[2];
var migrate = require('../lib/migrate')
var json;

if (!raw.trim()) {
  process.exit(1);
}

json = JSON.parse(raw)

console.log(JSON.stringify(migrate(json)))<commit_msg>[add] Error log<commit_after>#!/usr/bin/env node
'use strict';

var raw     = process.argv[2];
var migrate = require('../lib/migrate')
var json;

if (!raw.trim()) {
  console.error('ERROR: Expected a JSON sample as first argument.')
  process.exit(1);
}

json = JSON.parse(raw)

console.log(JSON.stringify(migrate(json)))
{'fraction_non_alphanumeric': 0.19055944055944055, 'fraction_numerical': 0.006993006993006993, 'mean_word_length': 4.457142857142857, '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': '6159418', 'n_tokens_mistral': 213, 'n_tokens_neox': 211, 'n_words': 45}