<commit_before>var fs = require('fs');
var assert = require('assert');
var Data = require('../lib/data/data');
var _ = require('underscore');

var config = JSON.parse(fs.readFileSync(__dirname+ '/../config.json', 'utf-8'));
var seed = JSON.parse(fs.readFileSync(__dirname+ '/schema.json', 'utf-8'));

var graph = new Data.Graph(seed, true);

// Setup Data.Adapter
graph.setAdapter('couch', { url: config.couchdb_url, force_updates: true });
<commit_msg>New Data.js API...<commit_after>var fs = require('fs');
var assert = require('assert');
var Data = require('../lib/data/data');
var _ = require('underscore');

var config = JSON.parse(fs.readFileSync(__dirname+ '/../config.json', 'utf-8'));
var seed = JSON.parse(fs.readFileSync(__dirname+ '/schema.json', 'utf-8'));

var graph = new Data.Graph(seed, true);

// Setup Data.Adapter
graph.connect('couch', { url: config.couchdb_url, force_updates: true });

{'fraction_non_alphanumeric': 0.20484581497797358, 'fraction_numerical': 0.004405286343612335, 'mean_word_length': 5.100671140939597, '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': '2294239', 'n_tokens_mistral': 303, 'n_tokens_neox': 300, 'n_words': 68}