<commit_before>
var http = require('http'),
    fs = require('fs'),
    path = require('path'),
    url = require('url');

exports.Apricot = Apricot;
sys = require('sys');

function Apricot(content,live) {
  var dom = require('jsdom-0.1.2/jsdom/level1/core').dom.level1.core;
  var browser = require('jsdom-0.1.2/jsdom/browser/index').windowAugmentation(dom);
  
  this.raw = content;
  
  // TODO, content should be applied to the whole document, not the body.
    
  browser.document.body.innerHTML = content;
  this.document = browser.document;
  this.window =  browser.window;
  this.matches = [];
  
  if (live) {
    this.live();
  }
  
  this.__defineGetter__("toHTML", function(){
    return this.document.body.innerHTML;<commit_msg>No need to specify jsdom version number on  because npm handles correct dependency version loading for you.<commit_after>
var http = require('http'),
    fs = require('fs'),
    path = require('path'),
    url = require('url');

exports.Apricot = Apricot;
sys = require('sys');

function Apricot(content,live) {
  var dom = require('jsdom/jsdom/level1/core').dom.level1.core;
  var browser = require('jsdom/jsdom/browser/index').windowAugmentation(dom);
  
  this.raw = content;
  
  // TODO, content should be applied to the whole document, not the body.
    
  browser.document.body.innerHTML = content;
  this.document = browser.document;
  this.window =  browser.window;
  this.matches = [];
  
  if (live) {
    this.live();
  }
  
  this.__defineGetter__("toHTML", function(){
    return this.document.body.innerHTML;
{'fraction_non_alphanumeric': 0.14514066496163683, 'fraction_numerical': 0.00639386189258312, 'mean_word_length': 3.616519174041298, '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': '2523653', 'n_tokens_mistral': 504, 'n_tokens_neox': 501, 'n_words': 115}