<commit_before>require File.dirname(__FILE__) + '/../lib/resir'

begin
  require 'spec'
rescue LoadError
  require 'rubygems'
  gem 'rspec'
  require 'spec'
end

# when load gets called to load in our ~/.resirrc, don't let it!
def load_with_ignorance *args
  if args.first == File.expand_path('~/.resirrc')
    true
  else
    load_without_ignorance *args
  end
end
Module.alias_method_chain :load, :ignorance<commit_msg>altho it works on one of my systems, this system was *not* happy with my intercepting Kernel::load and my alias_method_chain was running multiple times ... i could've probably just tweaked one part of one line, but it's re-written ... it's only for specs anyway<commit_after>require File.dirname(__FILE__) + '/../lib/resir'

def load_interceptor *args
  if args.first == File.expand_path('~/.resirrc')
    true
  else
    real_load args.first
  end
end
alias real_load load unless defined?real_load
alias load load_interceptor
{'fraction_non_alphanumeric': 0.09503695881731784, 'fraction_numerical': 0.0, 'mean_word_length': 4.208791208791209, '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': '309611', 'n_tokens_mistral': 307, 'n_tokens_neox': 300, 'n_words': 105}