<commit_before>$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))

require 'kindle_fs'

require 'rubygems'
require 'rspec'

def kindle_root; File.join(File.dirname(__FILE__), 'data', 'kindle'); end

# this is to reset the Singleton'ish nature of the Kindle module
module Kindle
  def self.reset
    @@root_path = nil
    @@collections = nil
    @@index = nil
  end<commit_msg>made the singleton reset more general<commit_after>$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))

require 'kindle_fs'

require 'rubygems'
require 'rspec'

def kindle_root; File.join(File.dirname(__FILE__), 'data', 'kindle'); end

# this is to reset the Singleton'ish nature of the Kindle module
module Kindle
  def self.reset
    self.class_variables.each do |var|
      eval("#{var} = nil")
    end
  end
{'fraction_non_alphanumeric': 0.13606194690265486, 'fraction_numerical': 0.0, 'mean_word_length': 5.033333333333333, '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': '7444649', 'n_tokens_mistral': 317, 'n_tokens_neox': 306, 'n_words': 78}