<commit_before>$: << File.expand_path(File.join(File.dirname(__FILE__)))
require 'rubygems'

CSVGEM = RUBY_VERSION.match(/^[0-1]\.[0-8]\./) ? 'faster_csv' : 'csv'

begin
	require CSVGEM
rescue LoadError
	puts "Failed to load #{CSVGEM} (ruby #{RUBY_VERSION})"
	puts "gem install #{CSVGEM}"
	exit
end

CSVParserClass = CSVGEM == 'csv' ? CSV : FasterCSV
require "csv2strings/converter"
require "strings2csv/converter"<commit_msg>Change exit by abort to exit properly in require during tests<commit_after>$: << File.expand_path(File.join(File.dirname(__FILE__)))
require 'rubygems'

CSVGEM = RUBY_VERSION.match(/^[0-1]\.[0-8]\./) ? 'faster_csv' : 'csv'

begin
	require CSVGEM
rescue LoadError
	puts "Failed to load #{CSVGEM} (ruby #{RUBY_VERSION})"
	puts "gem install #{CSVGEM}"
	abort
end

CSVParserClass = CSVGEM == 'csv' ? CSV : FasterCSV
require "csv2strings/converter"
require "strings2csv/converter"
{'fraction_non_alphanumeric': 0.15316315205327413, 'fraction_numerical': 0.013318534961154272, 'mean_word_length': 5.583941605839416, 'pattern_counts': {'":': 0, '<': 7, '<?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': '3699132', 'n_tokens_mistral': 359, 'n_tokens_neox': 343, 'n_words': 79}