<commit_before>var path = require('path');
var save = require('ngraph.tobinary');
var fs = require('fs');
var fileName = path.join(__dirname, '..', 'byField');

console.log('Parsing graph file...');
require('../lib/loadGraph.js')(performLayout, fileName);

function performLayout(graph) {
  console.log('Graph parsed. Found ' + graph.getNodesCount() + ' nodes and ' + graph.getLinksCount() + ' edges');
  var layout = require('hlayout')(graph);
  layout.run();
<commit_msg>moved createLayout to outer scope<commit_after>var path = require('path');
var save = require('ngraph.tobinary');
var createLayout = require('hlayout');
var fs = require('fs');
var fileName = path.join(__dirname, '..', 'byField');

console.log('Parsing graph file...');
require('../lib/loadGraph.js')(performLayout, fileName);

function performLayout(graph) {
  console.log('Graph parsed. Found ' + graph.getNodesCount() + ' nodes and ' + graph.getLinksCount() + ' edges');
  var layout = createLayout(graph);
  layout.run();

{'fraction_non_alphanumeric': 0.1881881881881882, 'fraction_numerical': 0.0, 'mean_word_length': 5.451612903225806, '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': '5298329', 'n_tokens_mistral': 302, 'n_tokens_neox': 307, 'n_words': 71}